Stainless is protected primarily by chromium oxide, a transparent oxide film that prevents further reaction with oxygen like rust. When machining stainless, if an iron particle gets embedded, the stainless now has a place where there is no oxide film for protection and corrosion starts. It is common that when machining fasteners they are cleaned with a nitric acid wash (Citric Acid was deemed too weak for my shop to passivate) to ensure the removal of embedded iron and build the passivation oxide surface.
Heat the stainless over 1500 degrees Fahrenheit and a heat stain will darken the finish, this visible discolored metal oxide will continue to resist corrosion.
Grinding wheel and wire brushes can contaminate stainless or even Nickel alloys (Hastelloy and Inconel) by an embedded an iron particle. These tools are labeled for steel or stainless so there is no confusion