Generally it's cheap/poorly designed audio amplifier circuits. Even though modern PC audio is mostly digital, the final stage (getting sound out the speaker) is still analog. If the motherboard designer isn't careful about how they place/isolate/ground the analog audio circuitry, it can pick up some of the PC's stray high frequency noise which gets worse the more you turn up the volume since now the noise gets amplified too.
A work around if you have a motherboard that is particularly bad about this is to use the digital audio output (S/PDIF via an optical or RCA jack) to connect an external amplifier or you could stream it via software. This tends to only be an option if the machine is stationary and not terribly realistic for people with a laptop on the go.