Here's why:
* Magnesium is highly reactive: It burns readily in air, combining with oxygen to form magnesium oxide (MgO).
* Carbon dioxide is a fire suppressant: It acts as a blanket, preventing oxygen from reaching the burning magnesium.
* No oxygen, no combustion: Since the combustion process requires oxygen, the absence of oxygen stops the burning reaction.
Important Note: While carbon dioxide is effective, you should never attempt to extinguish burning magnesium with water. Water reacts violently with burning magnesium, producing flammable hydrogen gas and potentially causing an explosion.