To keep it simple... if you remove the cap you have a flyback converter. With a flyback, the current in the primary ramps up linearly with time, then collapses to zero as the energy is dumped into the secondary. That sudden negative change in current can cause problems upstream of the flyback (EMI etc). The back emf (inductive switching spike) is caused by the sudden change in current (V/L = di/dt). If dt goes down, V goes up. The coupling cap slows down the change in current and hence the negative step on the input current looks more sinusoidal and the switching spike is reduced/disappears. This is the coupling cap resonating with the primary inductance. Changing the coupling cap should change the input current waveform as the resonant frequency changes. Pick about 1uF (rated higher than Vin + Vout) and experiment from there.
The coupling cap will also change the loop response, so certain values might make the output oscillate