Why does this circuit work with no ground?

Easiest way is to use the Ohm's law :

I = U / R

In your case:

I = (Vcc - Vpin) / R
Let's consider Vcc = 5V and R = 5Kohm (don't know your value. The current flows from Vcc to Vpin in case 1 only.

Case1 Vpin = 0V , I= 5v / 5kohm => I = 1 mA
Case2 Vpin= 5V , I=0v / 5kohm => I = 0mA

When you send , for example analogWrite(100), you keep the Vpin in 5v for 100 steps and 0v for the next 155 steps. You cannot see the LED blinking because all the 255 steps happen in 2 ms ( 1 second / 500). That is why you see it at "half light". The human eye makes a logarithmic average.

You have to be careful what resistances you take. High values are safe, but as above seen, you limit your current and your LED might not be as bright. Low values are not safe (one pin, if I remember correctly, is limited to 10mA).