That water can flow out of the glass with the water still remains in the glass, it is because of the water pressure powerful enough to fill our water glasses full, into water, it will push itself up through the tube.
The water can flow out of the glass of water that is left in a glass of water that is a pressure because as soon as we fill it with water to a glass of water until it is full, will push up through the tube.