It's not difficult. It's just energetically uphill. Undoing entropy costs energy. Second Law of Thermodynamics.
Molar mass of salt is 58g/mol, and the average sea water salinity is around 3.6%
So a cubic meter of sea water will have 1000*0.036/0.058=620 moles of salt, and it'll require 2.4MJ of energy to remove the salt in a perfect desalinator.
In more common units, 2.4MJ is about 0.75 kWh. Around here electricity is ~10 cents per kWh, so the absolutely lowest price of one cubic meter of desalinated water would be around 8 cents.