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.