Actually aluminum foil does get hot when it's in the oven but because it's an excellent thermal conductor and so thin the aluminum foil conducts and radiates all the heat away from the aluminum foil so rapidly that it cools off quickly.
And because it cools off so quickly it doesn't seem to get hot in the oven when in fact aluminum foil does get hot when in the oven.