About an upside down cup of water against atmosphere pressure

I assume you meant "cardboard", not "cupboard".

When the cup is full of water, it is empty of air, and water is relatively incompressible.

So when you turn it over, in order for the water to leak out, the cardboard would have to move a small amount away from the edge of the cup, which it cannot do without expanding the water slightly, which the incompressibility of the water does not allow. So if the seal around the edge of the cup is good, you cannot move the cardboard without reducing the pressure in the cup, and the air pressure outside is not being reduced, so the air pressure outside holds it in place.

If you did this in a vacuum (ignoring that the water would boil) it would not work. The cardboard would just fall off.

It is essentially no different that pressing the cardboard against a wet plate of glass. where it sticks unless somehow you can inject some air into the space, say by inserting a needle.