Reaction of magnesium with the surrounding air
I believe that magnesium exposed to air quickly ends up with a coating of magnesium oxide on its surface.  This oxide coating is quite uniform and does not allow any further oxygen to reach the surface.

Several metals, but NOT iron, have this property of a protective oxide coating.  In iron the coating forms a spongey surface easily penetrated by further oxygen.