The bottles all contain some air, which will be at ground-level air pressure.
The pressure inside the jet at altitude is lower, so the air inside the bottles expands. If not sealed tightly enough, it will leak and take some of the liquid with it.
Best thing is to squeeze the excess air out before traveling.