Because the formation of rust is a kind of chemistry reaction.
After chemistry reaction, compound with new properties is produced.
Of course, color is one of the new properties.
For example, if you put iron in colorless acid solution, a green solution is made.
This kind of chemisty reaction differs from physical reaction, for example, pigment with one color dissolves in liquid, a liquid with same color is made.
Answer:
Organic compound, any of a large class of chemical compounds in which one or more atoms of carbon are covalently linked to atoms of other elements, most commonly hydrogen, oxygen, or nitrogen.