It seems you have a switch mode power supply. They rectify the mains, and charge a capacitor with the rectified mains. The high voltage DC from the capacitor is fed to the transformer for a very short time, then disconnected. As the high voltage is disconnected, the energy in the transformer core is transferred to the output as a short pulse. The pulses of DC to the input of the transformer are only sent when needed.
You can probably hear the pulses in the transformer. The magnetic fields cause forces in the transformer, so any flexibility results in movement and then audible noise.
The noise will continue until the input capacitor is discharged, which can take a long time if there is no load.