This is the same reason you can hold your thumb over a drinking straw full of water to prevent the liquid from pouring out.