I was looking up at the derivation of Torricelli's law in my textbook:
$$P_a + \frac{1}{2}{\rho}v_1^2 + \rho gy_1=P + \rho gy_2$$
This is the equation representing one of the steps for its derivation. Before I start the main part of my question I would like to create an imaginary model with which the question is related.
The model Consider an open tank containing a liquid of density $\rho$ with a small hole in one side at a height $y_1$ from bottom. There is air above the surface of the liquid whose height is $y_2$. This air is at pressure P. The cross-sectional area of the tank is much larger than that of the hole which is the reason why I neglected the kinetic energy term on the right hand side of my equation above for velocity here as it would be negligible.
The main question Why have we used the pressure energy term on the left hand side of the equation i.e. pressure energy of water at hole equal to atmospheric pressure? This pressure according to me must be greater than atmospheric pressure for it is at depth that the pressure of water increases. My textbook says:
Since both the cross sections are open to the atmosphere, the pressure there equals to atmospheric pressure.