This may sound like an absurd question, But how does aluminum stay cool while its in the oven? I cooked a Turkey and I covered it for hours at a temperature of 350 Deg F. and it wasn't hot when I had to took it out.
The flaw in your reasoning is that you assumed touching the foil a few seconds after taking it out of the oven was a good measurement of its temperature when in the oven. But it wasn't, because the foil, being extremely thin, and a very good conductor of heat, gave up all of its excess heat to the air within 1 second of being brought into the cool air.
It does got hot. Aluminum is an excellent conductor of heat. Because of this, and foil is very thin, it loses its heat rapidly as well.
aluminum foil gets very hot when in the oven. but since it is a very thin film of metal it is rapidly cooled off when fresh cool air is in contact with it.
It gets just as hot - but aluminum is a great conductor both of heat and electricity. That means that heat and electricity move easily through it. THEN it's really really thin - so the heat is given up in seconds when you take it out of the oven - and this makes it appear as if it wasn't hot.
Aluminum does get hot, very very hot, when it is in the oven. However, it does not mean it remains hot for very long once you take it out of the oven environment. Aluminum, like most metals, have a specific low heat capacity, simply put, if you heat a gram of aluminum under a flame and a gram of water under the same flame for the same amount of time, the aluminum has a much higher temperature than the water. Since Aluminum is a metal, it also has excellent heat conductivity, so it loses energy to the environment quickly. In the case of your oven, the Aluminum foil loses a small amount of energy at a fast rate, by the time your hand touches the foil, it is already at the temperature near room temperature. If you smashed together a cube of Aluminum from foil, you'd find it still retains heat it has gained from the oven after you take it out. Hope it cleared your doubts:D