Starting around the time of USB, they started designing plugs so that the parts of the plug that carried power were slightly longer than the parts that carried data so that as you plugged it in, the power connected before the data. That wasn't something that was done with old connectors. In those, everything was the same length, so everything connected at once.
OTOH, USB is a more complicated protocol than the old serial / keyboard protocols. I think generally systems were built well enough that you were unlikely to "fry" something by plugging in or unplugging something like a keyboard while it was running. Especially because the keyboards used low current and low voltage. And computers used big discrete resistors, capacitors, etc. back in those days. But, you could get some bad data on the keyboard line.