As I understand it:
The plastic ball has a tiny hole in it. Under pressure, the inside and outside of the ball are at the same high pressure. Once you open the can, the inside of the ball is briefly at a much higher pressure than the rest of the can which equalizes instantly with atmospheric...