water cannot be compressed, but the air compresses and expands
the straw is raised, as the water level drops the air takes
up more room which means its pressure is lower than air pressure
acting on the surface of the water in the glass. As the straw
is raised further, the air pressure gets so low that the straw
can be removed from the glass without the water escaping the
straw. The water can't leave the straw because air pressure
from outside the straw is trying to get to the low pressure
in the straw, but can't get past the water.
the air is being compressed to a higher pressure than the
air pressure acting on the surface of the water in the glass,
so the level in the straw will be below the level of the water
in the glass.