Why does wrapping aluminium foil around my food help it keep warm, even though aluminium is a good conductor?

Being a shiny surface the aluminium sheet reflects radiant heat and reduces the heat loss by radiation by as much as $90\%$.

Being impermeable the sheet stops the movement of hot air from the vicinity of the surface of the food into the surrounding by convection currents.
This also has the effect of reducing the rate at which water evaporates from the surface of the food, evaporation requiring an input heat from the food.

However as you point out aluminium is a good conductor of heat and so does not reduce heat loss by this mechanism although it does trap a layer of air between the sheet and the food.
This does reduce the loss of heat by conduction as air is a bad conductor of heat.

You may have seen these properties of reduced heat loss at the end of a marathon with the use of "space blankets"?

enter image description here

Because while the aluminum is a good conductor, the air movement is moving a greater amount of heat, so if you stop, well reduce, the convection currents that slows down the heat escaping from the food.

If aluminum was better at cooling bodies, rather than keeping them warm, then they would not be used as "space" blankets or safety blankets in emergency situations ie when people are suffering from hypothermia etc

The main purpose of an aluminium sheet which is a great conductor, is:

$1)$ It prevents heat losses through the process of convection. The hot air is not circulated due to the presence of aluminium sheet.

$2)$ The layer of aluminium which surrounds the food also encloses a layer of air , which provides excellent insulation to the food as air is a very good insulator.

$3)$ Aluminium being a shiny surface reflects back most of the radiation from the food back and further prevents any heat loss.

$4)$ The losses are further prevented by minimising any heat loss by water vapour. As water when evaporates removes a lot of heat. The layer of aluminium keeps the saturated air inside and prevents/reduces evaporation

Note: I am posting a self answer, because I read in the community instructions that it is encouraged here to give an answer. Also many of the good points were summarised in the comments, so I wanted to state them in the form of an answer so that it becomes easier for anyone in the future having the same question to get an answer.