Magneton and Magnezone have seen healthy and consistent play since the 3rd generation thanks to the introduction of abilities, specifically Magnet Pull. Steel type is the strongest defensive type in the game and has formed the backbone of many a team since their introduction. Being able to effortlessly trap and eliminate such walls is what makes Magneton and Magnezone so powerful. While there are other possessors of Magnet Pull, the others have far worse typings than Magnezone (while Probopass is so passive it can't really eliminate opposing Steel types, Alolan Golem was an appreciable rival thanks to its Fire resistance and access to Earthquake and Fire Punch), which gives Magnezone more usage game in and game out even when your opponent isn't running Steel types.
However, Magnezone is not the perfect Steel type answer. Heatran, while not liking STAB Thunderbolt or Body Press more than anything else, possesses considerable Fire power, able to reliably OHKO Magnezone. Furthermore, Magnezone is heavily reliant on Body Press to answer Ferrothorn, and even then will be mangled thanks to Iron Barbs + potentially Leech Seed, Rocky Helmet and/or Spikes. Conversely, Kartana requires the raw Power of Choice Specs, as it has too much Defense for Body Press and its Electric Resistance is good at staving off the OHKO outside of Choice Specs. Additionally, many Physical Steel types carry Earthquake coverage, meaning if Magnezone can't outspeed and get the OHKO, it is threatened to receive the same in turn.
A whopping 11 Resistances plus 1 immunity and good bulk ensures Magnezone can tank many attacks, acting as a reliable pivot and ironically enough, a Steel wall itself. However, Magnezone's poor speed, exposure to most entry hazards and lack of reliable recovery prevent it from excelling at that role. The huge achilles heel to Ground Attacks (which is endemic to every fully evolved Magnet Pull user) is distressing, especially with how common Ground coverage is.
As long as Steel types remain a potent force in Pokémon, Magnezone will be there to strike them down with no other Pokémon quite capable of matching Magnezone's trapping, offensive and defensive utility.