You don't have to use aluminum foil when cooking a turkey.
However I would recommend you use the aluminum foil to cook the turkey especially when roasting or baking the turkey.
When you wrap the aluminum foil around the turkey and enclose the turkey in the aluminum foil you help hold the heat into the turkey.
When the turkey is wrapped in aluminum foil and the heat stays in the aluminum foil the turkey will cook or roast faster than it would without the aluminum foil.
Since I started wrapping my turkeys in aluminum foil the turkeys cook much faster than they did without the aluminum foil.
So yes you really should use aluminum foil when cooking a turkey if you want the turkey to cook faster although it's not required.