There isn't anything wrong with diversification, and this might even be a good idea.
I'm just commenting upon the likely motivations are primarily domestic politics and geopolitics given its pretty obvious that you could achieve similar results by doing this with onshore wind and solar installations in southern Spain with lower technical and cost requirements.
Its definitely true that outside of the EU we are going to be treated differently than if we were EU members. EU members will always come first, and geopolitical spats with say Spain over Gibraltar or France over fishing that would otherwise get mediated via the EU could now be higher risk in future.