Actually, a Maggy's EVs never contain Defense. Whatever isn't put into Speed and Sp.Attack goes into HP. There is a point with HP [Fire]. though, since it effectively OHKOs Forry (As long as you keep a watchful eye for Earthquakes on the switch) not to mention killing your opponent's Magneton (If they have one), but it comes at the penalty of being owned by Swampert. Oh, and having Thunder Wave rather than Metal Sound (I.e. a Thunderbolt, Hidden Power, Substitute, Thunder Wave set) has also worked well for me, but that's really a matter of taste and team dynamics. ^^
Anyways, yeah, Magneton's primary purpose is to kill of Skarm, although with HP [Grass] it also handles Swampert (And Dugtrio if you're using the Salac build), and with HP [Fire] it handles Forry and other Magnetons as well as Steelix if you hit it on the switch.