A cap in parallel with a choke creates a notch filter, one that is tuned to and has a very high impedance to a narrow range of frequencies. By choosing values that produce a filter centered at the ripple frequency of the power supply, usually 60 or 120Hz in the US, the ripple voltage that passes through is reduced.