Having something in the threads, be it a proper tool or a wheel axle, is a good idea -- it's possible to distort the mounting hole when straightening with spanners and then you can't put the mech back.
The proper tool is splendid, and using spanners feels epically wrong once you've sampled the real thing. But spanners works if you're careful. Harder with twists than straight bends, though. I like to use two spanners, one on the hanger and one on the dropout forward of the axle slot. Gives you something to lever against other than the frame itself and when the two spanners are parallel, you're done.
As for why it happened, I suspect an already slightly bent hanger and possibly a bit of a worn and sloppy mech conspired to hook the bottom end of the cage into the spokes when you shifted.