As the magma cools and when overburden pressure reduces, those gases rush out of solution like carbonation out of a newly opened bottle of soda, increasing the pressure in the magma chamber.