Indeed, I assume it has something to do with the second law of thermodynamics. Just like you can't make electricity out of heat alone but need a temperature difference, here you need different concentrations of salt.
If you want to read about some interesting stuff, you might wanna research "flux coupling". That is when one flux is used to pump another against a gradient, i.e. in the opposite direction as it would normally flow. That's pretty common in biological systems but there are physical cases as well when e.g. thermal and electric fluxes are coupled (Seebeck-/Peltier-effect).