Why does (dis)connecting a stepper motor while powered on damage the driver?
Because it is possible that one of the lines will disconnect first, the inductance on the line still connected can lead to dangerously high (or low) voltage levels and the other side of the free wheeling diode has nowhere to recirculate current through.  This can cause a very quick voltage spike that can blow out the output MOSFET(s).