Why a capacitor is connected between two ground terminals and what difference does it make?
Figure 1. The circuit has two grounds. The hollow ground symbol is used on the mains (live) side of the isolation. The solid ground symbol is used on the low-voltage DC side of the isolation.


  To suppress the high frequency common mode is is necessary to put capacitors between the input and output side of the power supply with a capacitance substantially higher than the capacitance in the flyback transformer. This effectively shorts out the high frequency and prevents it escaping from the device. Source: What does the Y capacitor in a SMPS do?.


Links:


Safety Capacitors First: Class-X and Class-Y Capacitors.