Here it happens because when the earphones' ground connection is disconnected from the source, the earpiece drivers remain connected to the L and R hot signals and their former common grounding point floats and leaves them in-series. This means that any signal present equally on L and R results in no current through the transducers. You hear only the difference signal in both ears, although to be precise, one is actually opposite in polarity.