Why does my oscilloscope work even without the ground connected to the circuit?
The circuit must have some other path for the connection.

For example circuit power supply can be connected to PC ground via grounded mains plug, and the PC oscilloscope ground is connected to PC ground.