Ok, I’m being brief but you seem genuinely curious, so, lemme explain what I mean:
In thermo, you would draw a line around a closed system, and say basically conservation of energy applies in this system. Energy in = work out + losses.
In a system where one input is the ocean, you basically just consider that infinite because of the size differences. One dinky little pipe compared to the mass flow into the system from the ocean, that math would be silly to bother with. That said, to swat down the stupid “this is perpetual motion” comments from people with Reddit engineering degrees, you also have to add in the energy input into the system of the sun, which is keeping the water from freezing over the course of 1 million years as it runs someone’s sarcastic water wheel.
Most people have this mentally backwards since it's currently so hard to separate salt and water and they don't really notice the water getting cold when they stir in salt. But... there's no reason a process couldn't separate them and give off energy from a thermodynamics point of view.
So salt combining with water takes energy, and separating it gives off energy. Yet combining happens spontaneously, and separation doesn’t. Because I don’t understand this, it seems like a paradox. What am I missing?
To move to each side of the energy states you need to overcome a hump between. Think electron tunneling. The separated side is the lower energy state. It's just that we don't know a good way to 'tunnel' to that state from the higher energy state in this particular case.
The separated state has an easy way to receive energy to overcome that hump. It just needs agitation. There should be a way to reverse it and gain energy but we haven't found a good way yet.
They’re talking about a tiny, tiny portion of the energy balance for one part of the salt in saltwater. The energy needs to actually purify it are far, far greater in practice.