Jupiter's equatorial eastward zonal flows reach wind velocities of ∼100 m s−1, while on Saturn they are three times as strong and extend about twice as wide in latitude, despite the two planets being overall dynamically similar. Recent gravity measurements obtained by the Juno and Cassini spacecraft uncovered that the depth of zonal flows on Saturn is about three times greater than on Jupiter. Here we show, using 3D deep convection simulations, that the atmospheric depth is the determining factor controlling both the strength and latitudinal extent of the equatorial zonal flows, consistent with the measurements for both planets. We show that the atmospheric depth is proportional to the convectively driven eddy momentum flux, which controls the strength of the zonal flows. These results provide a mechanistic explanation for the observed differences in the equatorial regions of Jupiter and Saturn, and offer new understandings about the dynamics of gas giants beyond the Solar System.