From the hole on the top, air flows to inside the can. From the hole below, the beverage comes out. If the top hole is not made, then air does not go inside, then beverage does not come out.
The air goes inside through the top hole to maintain pressure. Due to the pressure the beverage comes out. If the top hole is not made, the empty space inside the can made by the outward flow of beverage is not occupied by air and hence the pressure inside the can remains smaller than outside. Then fluid cannot flow out. It remains inside.