They did so for political and ideological reasons that I think are pretty clear to anyone who follows European politics.
Had those same political stakeholders had more direct executive control of a single national electricity system, they would have done the same thing and for the same reasons.
Yes, of course a vertically integrated system optimising for efficiency would never have made these choices but the same political decision makers who shut down Germany's nuclear fleet would never have permitted such an integrated system to operate in such an efficient way if it meant not building wind assets.
We can see the impact of a different political direction in the French electricity system, which despite being structurally similar to the decision making of the German system is in practice much more centrally directed and which despite absurd attempts to sabotage it from within France and within the EC continues to operate in a much more optimal way.
It doesn't do this through formal centralisation and integration but by the careful design of grid codes and subsidy regimes to avoid these absurdities.