Why did life originally begin in the ocean?
Actually no one knows where or how life originally began but the ocean is a likely candidate.
A single cell has to get nutrients like oxygen and energy molecules from its surroundings. Also a single cell has to get rid of waste products. Diffusion into and from a surrounding liquid environment is the most energy efficient way for a cell to do this.
The human body is mainly water in order for the cells to use a water environment to exchange gases and other materials. Interestingly the human body has almost the same salt concentration as the Ocean. This can be considered indirect evidence that possibly the first cell originated in the ocean.
Also cells are sensitive to destruction by solar (cosmic) radiation and Oxidation. Cells attempting to be formed in shallow ponds or pools would likely be destroyed by ultra violet radiation from the sun. A sun burn would be fatal to a beginning cell.
Cells are basically basic in structure. DNA and RNA are redux reducing agents. Oxygen in even low to moderate concentrations destroy these vital information carrying molecules. So cells would be unlikely to form on or near the surface of the earth where atmospheric oxygen would destroy the cell.
The present knowledge of cell and information theory makes the accidental occurrence of life unlikely. The deep ocean vents presently present the most likely place where life might have occurred.