I think we’re talking past one another. Solar is definitely economical in certain circumstances, and every country overbuilds to some extent. Whether building excess solar makes sense is a question of cost of a marginal unit of energy, since the water doesn’t care what powered its desalination. The energy isn’t wasted since it will eventually need to come from somewhere.
Another consideration is political sovereignty, since solar can’t easily be turned off by a foreign adversary.
Another consideration is political sovereignty, since solar can’t easily be turned off by a foreign adversary.