Why do power adapters sometimes produce noises?
Electronic devices such as chargers, power supplies and even computers sometimes make a recognizable "whining" noise when powered on. People often panic and thinking there are something wrong with their devices.
The "whining" sound is actually caused by coils (most of the time) resonance mechanically in the frequency of sound waves when electricity passing through it. The coil found in most chargers, power suppliers and other electronics components are just loops of wire. The electrical current passing through these wires will cause an effect known as Induction Heating, which causes the high pitched whining sound. (Induction Heating – Wikipedia)
Anatomy of transformers
All coil devices cause ‘whining’. Often the frequency of the whining sound is too high or too low for us to hear it, but it sometimes falls into our hearing frequency. So the ‘whining’ sound is common and perfectly normal. The sound may vary depending on the charging state and load.