Why In Figure E7-2 the zener D1 sets the reference voltage for the series pass transistor Q1, and C2 sits in parallel with that zener. A capacitor is a low impedance to AC and an open circuit to DC, so C2 shunts the leftover rectifier ripple and the zener's own noise to ground while leaving the DC reference level untouched. A cleaner reference means the regulator's output follows a steadier voltage, since the emitter of Q1 tracks the reference less one diode drop.
Watch out The brute force filter idea describes the large input capacitor right after the rectifier, which smooths the raw pulsating DC, not the small capacitor sitting across the zener reference.
Cap across the zener = ripple and noise shunt for the reference, not the main output filter.