Quote
Why do they require a neutral?

Because the electronic circuitry inside the unit needs power to operate, which is drawn from the hot and neutral wires, like any other load.

Quote
What makes them fail?

Besides improper installation, transient voltage spikes would probably be the leading killer, along with corrosion/short circuits from water leakage into the case.

Quote
Are there any moving parts inside one?

Only the armature of a relay in most units. Some units use a TRIAC or other solid state switch, eliminating the mechanical relay.

Quote
Guess I'll have to take apart the next bad one I replace.

"Reverse Engineering" is always instructive... [Linked Image]

Quote
I've been wiring these things for years yet I couldn't explain how one actually works.

Basically, just a comparator circuit. A comparator looks at 2 different voltages (signal and reference), and turns on an output if the signal input equals or exceeds the "reference" voltage. In a photocell switch, the input signal comes from a cadmium sulfide photocell, which produces a voltage proportional to the ambient light level. The reference voltage is set by the "sensitivity" adjustment pot. When the sensor voltage drops below the setpoint, a relay is turned on, energizing the load.