Air pressure gradient inside and outside the chest cavity has a vital role in the mechanism of breathing. For instance, when the air pressure inside the chest cavity is greater than the outside, air flows out of the lungs, thus, we exhale. When the air pressure outside the chest cavity is greater than the inside, air flows into the lungs, thus, we inhale.
Pressure equalization on both ears is a function of the eustachian tube. Normally the tube is closed but it can open to let a small amount of air through in order to equalize the air between the middle ear and the atmosphere.