Direct connection or using capacitor when shorting PSU's DC negative terminal to earth terminal?
Capacitor is used as bypass capacitor to eliminate stray current from the psu.

the point is the earth and the negative terminal should be at same potential that is zero. if there is any spike in the voltage on negative terminal due to reference issue the capacitor will store the charge inside it