Why does iron rust but aluminium doesn't?
Both metals do react with oxygen. The difference is entirely in what the resulting oxide does — and it is one of the most consequential differences in materials science.
Iron. Iron reacts with oxygen and water to form hydrated iron oxide — rust. The crucial property is that rust is flaky, porous and takes up more volume than the metal it came from. It does not adhere well, so it cracks and falls away, continuously exposing fresh metal underneath.
The process therefore never stops. Given enough time, water and oxygen, an iron object rusts entirely through. Rust also expands as it forms, which is why it cracks concrete around reinforcing bars and splits car panels from inside.
Both water and oxygen are required. Iron does not rust in dry air, or in oxygen-free water — which is why shipwrecks in deep, cold, low-oxygen water survive remarkably well.
Aluminium. Aluminium is actually more reactive than iron — which surprises people. Exposed to air it oxidises almost instantly.
The difference is that aluminium oxide is hard, dense, transparent and tightly bonded to the metal beneath. It forms a layer only a few nanometres thick and then stops the reaction, because oxygen can no longer reach the metal. This is called passivation.
The layer is also self-healing — scratch it and a new oxide layer forms within moments.
Anodising deliberately thickens this layer electrochemically for better protection and to accept dye.
Other examples of passivation: stainless steel works the same way, with chromium forming a passive oxide layer — which is why stainless steel stains when that layer is damaged or starved of oxygen. Copper forms a protective green patina. Zinc protects steel in galvanising, both as a barrier and sacrificially, corroding preferentially.
Aluminium does corrode in acidic or alkaline conditions and in salt water, where the passive layer is attacked.