Paint is applied to the iron articles to prevent them from corrosion by rust. Rust is an iron oxide, usually red oxide formed by the redox reaction of iron and oxygen in the presence of water or air moisture.
Paint prevents iron from getting exposed to air and moisture.