The capacitor is to reduce RF interference.
When a diode is conducting it will create charge carriers to carry the current - this is known as "charge storage".
When the voltage reverses as part of the normal AC cycle (50/60Hz typically) the current will keep flowing through the diode in the reverse direction until the stored carriers are depleted.
When the carriers have been flushed from the diode the current will abruptly drop to zero and the voltage across the diode will suddenly rise. This can generate high frequencies up to tens or hundreds of Megahertz. This can interfere either with the equipment itself or radiate (or conduct via the power cable) to other equipment. The capacitor suppresses the effect of this interference. Often a capacitor will be put in parallel with each diode rather than a single capacitor.
Any interference will usually have modulation at twice the AC input frequency and appear as a buzz in radios or audio amplifiers.
Common power diodes can exhibit this but the effect is exploited in devices called "Snap Recovery Diodes" (Wikipedia - Snap recovery diode). To minimize the effect some diodes are designed intentionally to gradually deplete the charge - they are known as "soft recovery diodes".