Water is a lot easier to store than electricity. Desalinate while the sun is shining to fill a reservoir that you can pull from 24/7.
Cheap to store, expensive to transport. Desalinisation only makes sense if you are near the coast and short of water. Further inland it becomes uneconomical.
The Earth is not short on fresh water, the problem is getting fresh water where it is needed.
Most existing plants are designed for this, but it is by no means necessary.
https://www.sciencedirect.com/science/article/pii/S001191642...
>This work analyses the long-term performance of a full-scale brackish water reverse osmosis (BWRO) desalination plant that has been working under intermittent operating conditions for 14 years (~9 h d−1).