While plenty of people don't live near the ocean, lots do. Oceanside areas with large populations are going to have wastewater treatment plants (in developed countries, anyway). These places therefore have two potential sources of new water supply: ocean desalination or potable reuse of recycled wastewater.
Potable reuse of wastewater is nothing new. Almost any city drawing water from a river which has another city upstream is already doing it; the question is can we do it without lying to ourselves. In the case of astronauts and the International Space Station, they can do it outright, but the rest of us have to catch up.
Or not. Ocean desal actually uses the same technologies that potable reuse requires, either distillation or more commonly through reverse osmosis. The difference is that ocean water has a lot more stuff in it (mainly salt) than wastewater which already has to go through some purification before it reaches your reverse-osmosis system. That means a lot more energy and cost is involved in ocean desalination than potable reuse, so we've got a climate change issue.
The other climate change issue is that the lack of water currently stops a lot of unwise sprawl development, but ocean desal could change that, or maybe even mandate it - a very expensive desal system could be built on the expectation that there will be a lot more development to pay for it. I suppose there's some sprawl risk from potable reuse as well, but because it functions best in an existing populated area, starting at the wastewater treatment plan and then spreading from there, the risk is lower.
Many other factors involved of course, but these are the main climate issues. All but one of the factors weigh in favor of potable reuse. The one factor favoring ocean desal is psychology and political acceptance. People hesitate to drink this water, and that hesitation killed an earlier potable reuse project in San Diego (p. 17).
I view desal and portable reuse as being in a race. Money is limited so communities are going to prioritize. As much as I can I've supported potable reuse and opposed desal.
First step for potable reuse is Indirect Potable Reuse, achieving psychological acceptance by making the treated water sit somewhere for a while before reuse, either in a reservoir or underground. It's good but maximum flexibility and less cost require Direct Potable Reuse, shunting the water to your drinking water plants.
At my water district we've set up a reverse osmosis system. Currently it's just to improve the quality of non-potable recycled water which will help with certain types of uses, but the goal is potable, if we can get public acceptance.
Note: stumbled across this - Los Angeles actually constructed an indirect potable reuse plant in the 1930s, but shut it down when they acquired Colorado River water. Back to the future, like with electric cars.
Also, desalination sometimes refers to desal of brackish water, usually groundwater. This water is much less salty than ocean water so a lot of the energy concerns are reduced with brackish desal. But brackish water and even potable reuse require a fair amount of energy, just nowhere near as much as ocean desal.