For example, a technique of masking distortion (or clipping, rather) is adding something with rich harmonic content (a trumpet for example) to parts that are expected to be hitting the wall and otherwise distorting / clipping.
Would trumpets be there otherwise? I don't know, but I'm sure producers are aware of the limitations of digital audio and as such adapt the music to it.
For example, analog tape naturally saturates high frequency sounds before low frequency sounds, which brings down the peak level of a close mic'd drum. Peak limiting a recording which already has analog-saturated drums produces fewer audible artifacts.
In the abstract, at mastering-time you can achieve any absolute level without hard-clipping by smushing down the peaks with peak limiting and multi-band compression, then dialing things back up with makeup gain. But when compared against the original recording in a level matched test, at some point the processed result becomes unacceptably degraded.
Compression is an optimization for making the song sound better at louder volume