Why does oscilloscope still shows the signal even though its GND is not connected?
In most cases the o'scope ground is connected to the mains earth, and your circuit's ground too, so there is a ground connection.

If either ground is not thus connected there is still a relatively large capacitive coupling.