If magnesium reacts with oxygen to produce magnesium oxide only on the application of heat, then why isn't it categorised as an endothermic reaction?
Why isn't the energy that is used to overcome the activation energy of magnesium metal atoms to react with oxygen, not taken into account?


Typically, the activation energy is much higher than the difference in energy between reactants and products. The activation energy gets used when you go from reactants to activated complex, and more or less becomes available again when you go from activated complex to product. As Waylander stated in the comments, exo- or endothermic is based on the difference in energy between reactants and products, not the size of the activation energy (otherwise, all reactions would be endothermic).


  If magnesium reacts with oxygen to produce magnesium oxide only on the application of heat, then why isn't it categorised as an endothermic reaction?


Just because you are heating something to get it to react does not mean there is a net flow of heat from the surrounding into the reaction. It would be more accurate to say that you are increasing the temperature to allow the reaction to proceed.


  [from the comments]: You just need to heat up a 1/4 inch and get that burning. Then the burning itself supplies enough heat to keep the ribbon burning.


Again, this is about the temperature, not about exothermic or endothermic. There are multiple reasons why a reaction would happen at high temperatures but not at low temperatures:


Change in equilibrium constant: For example, water vapor forms dew at lower temperature, and dew evaporates again at higher temperature. The activation energy is sufficiently low that evaporation and condensation take place at either temperature, but the net direction changes.
Reaction rates: Some reactions have a high activation energy and are too slow at low temperature, so you have to raise the temperature to observe them. This does not mean they are endothermic (check out the thermite reaction).
Allowing the reactants to come together: Magnesium is covered in a layer of magnesium oxide, preventing oxygen in air to react with the magnesium. At higher temperature, magnesium metal melts and comes in contact with air.
A slow step in a multi-step chain reaction: In radical reactions, the initial formation of a radical has the highest activation energy, whereas reaction of a radical with other reactants to form another radical (chain propagation) has a lower activation energy. In this case, the first step would require higher temperature (like a spark) or a catalyst (radical starter) and then the chain reaction can proceed at low temperature.


For all but the first, it does not matter whether the reaction is endothermic or exothermic - higher temperature helps or is required to observe a reaction. You can have a endothermic reaction even at lower temperatures. The heat transfer can happen even under low temperature conditions because the molecules have thermal energy nonetheless.

Using day-to-day language, that sounds weird because we associate heat with temperatures higher than body temperature, so we might doubt that there is heat in cold water. However, reactions that cool down the water even more demonstrate that the water can transfer heat to these processes (e.g. cold water can melt ice).