Magnets attract certain metals like iron, nickel and cobalt. Attractiveness can also pertain to humans, and can refer to how appealing someone is to look at. The joke is playing on the word "attractive" and how it pertains to both magnets and humans.
Those who make magnets can be quite attractive .