They resist the Bug type because bugs and insects don't have enough force to make any physical change to metals.

They resist the Dragon type because in medieval legends, knights used steel armors to take on dragons to resist their attacks and be able to kill them.

They resist the Normal type because most Normal-type moves are Physical, and not so powerful as those of the Fighting type, and steel is hard enough to resist those kind of attacks.

They resist the Psychic type because, since steel lacks life and it's an inorganic material, mind-controlled powers can't hurt them much. Something curious is that Kadabra and Alakazam bend metal spoons with their mind.

Until Generation V, they resisted the Dark and Ghost types because machines don't feel fear, since they don't have emotions or feelings, but, from Generation VI onward, they don't resist these types anymore, probably because not all Steel-type Pokémon are machines, also, all of them have feelings, they could have fear at one point. However, they still resist the Psychic type.

They're immune to the Poison type because poison doesn't affect things that are not organic.

The Electric type resists them because it is an electricity conductor and their magnetism can repel their attacks.