On first connection there is some equalization current. If the initial voltage is high enough it might spark.
It doesn’t have to be leakage from floating supply, might also be ESD.
This is why connectors always connect chassis or negative first.
Audio plugs do not, and this is what you can kill your equipment.