Aluminium foil does have several advantages compared to other options when wrapping food.
You can wrap very hot food in aluminium foil without any problems. Plastic on the other hand might melt and you can get leaks.
You can wrap food ready to cook in foil, and then you can put the foil packet in the coals of a fire or in the oven. This way you can cook things quickly without the need for other pots or pans.
Aluminium foil isn’t a huge problem with regards to waste, as aluminium is a natural part of the environment and animals won’t eat it and suffer, unlike plastic.
Depending on how you wrap the food, aluminium foil can help keep it warm a bit longer.
When you are cooking things in the oven, on a fire or on a grill, it can be useful to partially wrap the food to avoid overcooking. You could for example wrap the chicken legs and wings with foil to avoid these getting dry or burnt while you still have to cook the rest of the chicken a bit more.
There are a couple of disadvantages to aluminium foil.
It’s not usually possible to get a totally air-tight seal.
You should be careful if you want to wrap acidic foods, as they might cause a reaction with the foil.
You should never put foil wrapped food in the microwave oven.