// She effectively unilaterally abandoned the Dublin Agreement and told the world that Germany will accept as refugees whoever turns up. //
That is not quite how it happened. The Dublin Agreement says refugees must apply at the point of entry to the EU for asylum, and if they move, they must be returned to that country. The Agreement was broken by Hungary, not Germany.
The Hungarians did not accept any asylum requests, and instead, put the refugees on the first train to Berlin, where they then claimed asylum. The Dublin Agreement said that Hungary, as the point of entry, must take them back, but the Hungarians just flatly refused that. Merkel didn't really have any choice, and she neither encouraged nor welcomed the refugees.
It was only when refugees started to arrive in Germany, that she began to formulate the plan to pay the Turks to police the EU border.
It does seem odd that the EU would sooner give Turkey £3billion than give it to EU member states like Greece, who could do with a £3billion boost and where half the population is unemployed.