Why is an iron grill painted frequently?

An iron grill is painted frequently to protect it from rusting. The paint acts as a protective layer, preventing oxygen and water from coming into contact with the iron, thus reducing the chances of oxidation and corrosion.