If all oxygen in seawater comes either from exchange with the atmosphere or from photosynthesis by phytoplankton in the euphotic zone, how do you

If all oxygen in seawater comes either from exchange with the atmosphere or from photosynthesis by phytoplankton in the euphotic zone, how do you explain that there is sufficient dissolved oxygen throughout the water column, even in the greatest depths, except in highly unusual locations? Also, how did photosynthesis allow life to come out of the ocean and on to land?