Why does hot plugging blow stuff up, and how to prevent it?
Notice the two pins on both sides are longer, and the two in the center are shorter. This ensures connections are made in the proper order (and also broken in the proper order when unplugging).

If the connector is not designed for hot plugging, there is no such guarantee.

The order you want is:


First, Ground/shield.


This ensures both sides agree on what "0V" is, and also discharges any static electricity safely. Sometimes a tiny spark is visible. You do not want to connect the ESD sensitive pins first! 


Second, power supply.
Third, signals


Order is very important. You really want to avoid applying voltage to the signal pins of an unpowered chip, as current will then flow through the ESD protection diodes, and the chip will be powered from its IO pins. This can damage the chip.

Also, if ground connects last, then the signal lines will act as ground instead, and current will flow in them. If the device contains 3V3 chips powered by a LDO from the +5V from USB and ground isn't connected, who knows what the voltages inside the device are going to be...

An excellent example of how NOT to do it are audio RCA connectors.



Notice how the tip makes contact first. I'm sure you've done this before. The loudspeakers let out a very loud hum, until the grounds are connected.


  why do things not like being hot plugged?


It's because the pins connect in the wrong order.

Since you mention an ESC, I guess you have voltages and currents large enough to fry some chips. In this case not connecting the ground first can really hurt...


  is there an easy way I protect againest this?


Use a connector that is hotplug-safe. If it does not carry the power supply, only signals and ground, then you could get away with large value resistors on the signal lines instead... but it's a hack.

Unfortunately these connectors are very uncommon. Headers like the ones used with arduino's are designed to be a part of a finished product that will only be plugged during manufacture, so they will not be hotplug-safe.

Hotplug-safe connectors will be available for the usual standards (USB, HDMI, whatever) but this will not be what you need for your application.

So, I guess you're stuck doing it carefully, powering down before messing with the circuit...