Many questions have been asked here about why the Earth has a magnetic field, e.g.,
At the risk of oversimplifying a bit, the answer is the dynamo theory. Convection in an electrically conductive, rotating fluid – in this case, the molten metal in the planet's core – creates electric currents that, in turn, generate a magnetic field.
Why doesn't the same thing happen in the oceans? A large ocean like the Pacific would appear to have all of the general properties required for a dynamo. It is made of conductive saltwater; it has significant bulk flows (indeed, ocean currents are much faster than convective currents in the core); and it rotates with the planet. Is the higher resistivity the key difference? If so, would a saltier ocean be able to generate a magnetic field?