How do physical connection interfaces handle floating voltages
I think the problem you experienced was actually because there was a ground connection at both ends.  What you saw was the end results of a ground loop.

When you have two systems each with their own power supply, both connected to ground through different routes, the resistance of that ground path can differ for each device.  That means that in fact the electrical potential at ground can be different between the two units.

Connect those two different voltages together, with what basically amounts to a short circuit, and you get a spark.

When you have something that has no ground connection there is no voltage difference, since only one side has a potential to real ground.  In the laptop the earth connection does not form part of its circuit in any form whatsoever.

Incidentally, the USB specifications actually state that the shield of a USB cable should only be connected to ground at the host end, not the device end - unless that device is purely bus powered in which case the shield forms part of the ground return for the power.