What you are experiencing is known as "supercooling." Supercooling occurs when a liquid is cooled below its freezing point without actually solidifying. This happens because, in the absence of any impurities or nucleation sites that would typically trigger the freezing process, the liquid remains in a metastable state.
When you place a soda in a glass bottle in the freezer, the liquid cools down significantly but doesn't freeze immediately. This is because there are no impurities or rough surfaces in the soda that can act as starting points for ice crystals to form. So, the soda can exist in a supercooled state, below its freezing point, without solidifying.
However, when you open the bottle or disturb it in some way, the soda gets agitated. This disturbance provides the necessary impetus for ice crystals to form, and the supercooled liquid rapidly freezes into ice. This is known as "snap freezing" or "spontaneous nucleation," where the sudden introduction of nucleation sites causes a rapid crystallization of the supercooled liquid.
In other words, the soda remains in a liquid state at a temperature below its freezing point until you open the bottle and introduce nucleation sites, prompting it to freeze quickly into icy slush.
It's a fascinating phenomenon, but it's worth noting that supercooling is not limited to soda; it can happen with other liquids as well under the right conditions.