system
Given the following post, respond as if you're commenting on Reddit:
human
Where did all the salt in the oceans come from?
gpt
Rocks. A mineral is only stable under the physical conditions where it was born. Take an igneous rock and expose it to the lower temperature and pressure on the earth’s surface and it won’t remain the same thing indefinitely. Minerals like feldspars will slowly react with carbon dioxide and water to form clays, and this liberates some of the sodium and other alkali-metal ions they contain. 

Sodium ions dissolve in water, and the water eventually carries them into the ocean. Once sodium is in the ocean, no ordinary process exists to efficiently take it back out. So it builds up and builds up.

The oceans have also built up other salts, too: magnesium sulfate, some potassium salts, calcium carbonate. These happen from the same cause. 

I’m not entirely sure what specifically produces the chloride. But chlorine, in its ionic form as chloride, does appear throughout planet-forming minerals. It, too, is readily soluble and susceptible to the action of water. Once out in the water, like sodium, there’s no ordinary chemical and physical process to take it back out. (You can do things, like add ionic silver to produce solid silver chloride, but the earth isn’t that full of silver). So it builds up.