Their are two potential causes.
1) The magnets themselves are ceramic and cannot rust, they can however attract iron particles and I have seen them new out of the box will small filings from manufacturing on them. These may rust and create a stain which can be cleaned off and will not recur unless more iron filings are picked up and keep in mind GFO is rust in pellets and can be attracted to the magnets and may be a source of this staining.
2) The magnets are on an iron plate, it is a plain iron plate, not plated or galvanized (i.e., no toxic metals). This plate is coated by polyurethane, the black resin you see around and between the magnets and serves to bridge the magnets so they work as a team. In rare cases this seal may be breached. Such staining is generally more dramatic than shown and the loose bits of debris around the edge of the magnet with more rust points to issue 1.