Magnesium is very reactive metal. When stored it reacts with oxygen to form a layer magnesium oxide on its surface.
This layer of magnesium oxide is quite stable and prevents further reaction of magnesium with oxygen.
The magnesium ribbon is cleaned by sand paper to remove this layer so that the underlying metal can be exposed into air.