Neither can be expected to constantly produce food unless the harvester returns organic material to be used as fertilizer. Regarding the garden this is a well known fact. But the oceans are so large that their ability to produce seemed to us to be without limit. And we assumed that some magical force of nature had always worked to, and would continue to replenish the stocks that we removed.
Marine biology is a fairly advanced science and a lot of detailed study has been done.
As far as I could determine, this is what is known about how nature produces fish in the sea. These tiny plants are commonly described as being able to make their own food . This refers to the fact that they, along with other plants, remove carbon dioxide from the atmosphere, use the carbon to build the body of the plant, and then release the left-over oxygen. These plants also make use of water in this process. As far as sea-plants are concerned, there is obviously no shortage of either carbon dioxide or water.