Why do transformers hum?
While the classic answer is because they don't know the words, in reality transformers create a humming sound because the core vibrates while in operation. The vibration is caused by an effect related to the AC sine wave called Magnetostriction. The sound is related to voltage. Load and harmonics throughout the transformer's nameplate load curve have little additional affect. Typically the transformer's core acts like a bell and the bigger the transformer, the larger the bell and the louder the hum.
Manufacturers have options such as reducing the degree of magnetic flux density within the core to lower the noise.