That is why all serious inter-computer USB devices use galvanically isolated connection (e.g. using optocouplers)
It won't stop you from sending 200V into it and frying something, but it will stop short-circuits and faulty/non-spec USB devices from doing serious damage.
I guess it's a cheap safeguard that works pretty well for consumer products.
If the GNDs are different then neither device will be “providing power” in the traditional sense. Rather current will flow from the GND of one device to the GND of the other, and GNDs are normally not protected.
You will probably also see power flow on the V+ rails as well because they will be referenced against the GND in each device. In that case the devices can cut the power, but that only protects the V+ rail, not your GND rail that could still be transporting enough current to melt something.
This is usually more of a problem with audio equipment that has analogue signals with very high sensitivity. A ground loop can convert any nearby magnetic fluctuations (like say from the electricity flowing through the mains cables in the walls) into a nasty bit of noise.