The eurozone works for Germany because it provides a mechanism for turning German economic might into a depoliticized, anonymous set of macroeconomic rules. This was why the Greek crisis of 2015 was so traumatic for Germany and why Ms. Merkel and her finance minister, Wolfgang Schäuble, were unforgiving in their treatment of Greece.

The Greek government and, in particular, its finance minister at the time, Yanis Varoufakis, tried to transform the shadowy and technocratic meetings of the eurozone finance ministers into public arguments about the causes of the crisis. This changed Germany’s de facto running of the currency union into something much more sinister, where what is good for Germany is not good for Europe as a whole.

But even if Germany has succeeded at the expense of Europe’s poorer countries, Ms. Merkel is no nationalist. Pragmatism and opportunism alone drive her decisions, and retaining power is her primary goal. This has been her approach to politics at home during her nearly 12 years in office: She has taken the sting out of German electoral politics by adopting key policies promoted by other parties. In the space of just weeks in 2011 she reversed her policy on nuclear energy, adopting the Green Party’s longstanding pledge to eradicate Germany’s reliance on nuclear power. She has done something similar on the national minimum wage, a key Social Democrat Party policy that she has made her own.

When it comes to the international liberal order, this attitude means that collectively agreed-to rules don’t count when weighed against German public opinion. Just look at Ms. Merkel’s handling of the European refugee crisis. In August 2015, she declared that all Syrian refugees stuck in the Balkans and Southern Europe were welcome in Germany. A cause for celebration for supporters of more open borders, Ms. Merkel’s decision was arguably a unilateral breach of European asylum law.

As ever with the German chancellor, it is difficult to know her motives. Perhaps she was overcome by a desire to help desperate people. More likely, she was attempting to rehabilitate Germany’s battered image. Her decision to open Germany’s borders came only a few weeks after she had thrown her weight behind a new bailout agreement with Greece that imposed on the Greek people a pitiless schedule of debt repayments and led to an outpouring of anti-German sentiment in many parts of Europe.

Whatever her motivations, her welcoming spirit didn’t last long. In the course of 2016, faced with growing domestic opposition, Ms. Merkel shifted the focus to closing borders and deporting asylum seekers. As many as 70 percent of asylum seekers arrived in Germany without documentation, and Ms. Merkel’s government has turned its attention to expelling those it feels have no right to stay.

Most significantly, Ms. Merkel was the driving force behind the March 2016 Turkey-European Union refugee deal. Under this agreement, the European Union has pledged billions of euros to Turkey in exchange for keeping Syrian refugees on Turkish soil. The deal ignored doubts about the status of Turkey as a “safe haven country” for asylum seekers. Its measure of success is whether it has brought down to zero the number of new arrivals into the European Union. The deal that Ms. Merkel helped engineer with Turkey was the bureaucratic equivalent of Mr. Trump’s plan for a border wall; it’s a version of “Fortress Europe” that must make Marine Le Pen and Geert Wilders smile.

Will Ms. Merkel defend the Western liberal order against the onslaught of Donald Trump when she visits Washington this week? Of course she won’t. She may not go as far as holding his hand — but she will strike a deal with Mr. Trump that is good for Germany and good for her electoral fortunes at home. That is what she has always done, and it would be absurd to expect her to do anything different.