They absorb salts because there is very little salt in their environment. Yes you're correct this salt concentration would attract even more water via osmosis, however this is why freshwater fish produce copious amounts of dilute urine to counteract this.