The way stainless steel resists corrosion is the reaction of chromium and oxygen in the air to produce a protective chromium oxide layer. If you mess up the surface with a magnet you're trapping water in the interface, pushing that chromium oxide layer aside, and probably causing micro scratches.