I think the reason for it is not that this was not known, but political issues regarding the power lines...
UK has a similar situation between England and Scotland. Connectors between them require approval from both regions and so national grid are landing cables from off shore wind farms hundreds of miles further south than they should. All to avoid politicians.
Cut off the NIMBYs from the grid and see where that gets them.
Germany is ruled by NIMBYs, unfortunately. And a lot of people are just stuck in the past and refuse to acknowledge that things change regardless of whether they like it or not. Oh and then there's the Bavarians.
We also have to create a system, which values the location of the energy production. So something like electricity price zones or something similar.
No you really don't.
For renewables to work you need diversity of generation. The sun might be shining in Spain when the wind doesn't blow in Germany. If we start putting barriers to cooperation in place through "local first" mindsets then each region will be maintain gas and coal long after they could have been turned off.
The problem is that you need a reason to transport the electricity from Spain to Germany. There are very real limits to the electricity grid and that means, that you can not ignore the location of the electricity production. So in a market based system, electricity in Spain has to be cheaper then in Germany, the difference being the cost of electricity transport and/or the cost of flexible electricity generation in Germany, depending on the grid having enough capacity.
That does not mean barriers, just a system to not pretend the weather in Spain and Germany is the same at all times or that the electricity grid is not limited in any way.
Green Energy
everything about energy production