It can be explained by Pilling-Bedworth rule. When Aluminium reacts with oxygen, the volume of aluminium oxide layer is greater than the volume of aluminium used. Thus, the oxide layer formed by aluminium is non-porous, protective and prevents further corrosion. While in the case of Iron, the volume of oxide layer formed is lesser and thus oxide layer is porous, non-protective and induces further corrosion.