What is the purpose of putting a capacitor on the primary side of a step-down transformer?
In addition to Autistic's correct answer, the value of C9 (X rated) is a compromise between consuming excessive AC current at 60 Hz while suppressing the noise voltage spikes by about 3 dB to 6 dB at the transformer primary if power is cut off when the 60 Hz sine wave is at or close to peak current. C9 does NOT behave like a MOV or TransZorb, but an active noise filter. When the power is cut off as mentioned above there is a burst of noise, the back EMF from the transformer. This can send substantial RF noise into local air space as well as increase arcing of the switch contacts.
C9 consumes about 150 µA of current at 60 Hz (18 mW at 120 VAC), not enough to heat up anything. If C9 were large enough to suppress most of the noise burst (say 0.33 uF), it would consume 15 milliamperes of current and 1.8 watts of reactive power. The design engineer was being careful about the power budget vs. its ability to absorb a useful amount of RF noise, likely based on oscilloscope readings of the primary voltage when the switch is turned off.
Also if C9 had a high value then it could cause a brief current spike when the power is turned ON. Keeping C9 at a low value avoids this problem as well as the extra space and cost of a large X rated capacitor.
C9 snubs the transformer primary inductance. This damps the inductive spike that occurs when the power switch is turned off when current is flowing. This capacitor is often present in audio systems.
This can save speakers from a turnoff plop sound that can be annoying or even destructive.