To clarify, all metals (except a few like gold and aluminum) Rust, Rust is iron oxidation, Gold oxidizes and so does Aluminum, but not the nasty rust we see on our car parts.
Stainless steel is simply less prone to it because of the metals that go into it. Any imperfections in the finish would yield crevices that would hold moisture and dirt etc, and this would eventually lead to rust even in stainless steel. There are different grades of stainless steel. Some magnetic some not, mostly non-(used in hospitals and food grade cutlery). But there are still true stainless metals that are magnetic, as far as the stock h-pipe is concerned, I cannot recall exactly, I merely wanted to explain that it is possible.