The iron bar will corrode till the level marked by the line first.
Iron gets oxidised on exposure to air and moisture. The layer of rust formed on the surface allows air and moisture to pass through and reach the metal, causing corrosion to continue.
Aluminium gets oxidised on exposure to air. The layer of oxide formed on the surface forms a protective coating that prevents air from reaching the metal and thus prevents further corrosion.