There are five classes of stainless steel, and only one is non-magnetic. However, it just happens to be that the most widely used type (austenitic) is the one that is not magnetic.
The main constituent of stainless steel is iron. Different grades of stainless steel contain different amounts and forms of iron – and this is what determines the magnetism of the steel. There are two basic types of stainless steel: ferritic and austenitic. Ferritic steel contains a high concentration of iron. Austenitic steel contains a particular phase of iron called austenite or gamma iron. Austenite is non-magnetic, which means that austenitic steel is as well. Ferritic stainless steel, on the other hand, is magnetic.