Well they knew how to record back in the '60's. If you've heard music by the Monkeys, Doors, for example they are damn good.
I think there may have been a fear from recording companies when cd came out that people would be able to copy near perfect recordings. Thus they would lose control of the master content which they own. So I speculate they deliberately produced compressed cd copies for this reason.
Also cd, digital being new, editors didn't know or care to exploit its potential. Even now I find the vast majority of cd's clip my pre-amp, meaning they are recorded at above 2 volts. And this is the reason vinyl is preferred by many audiophiles because the recording or dynamic range is smooth and more pleasant to listened to than a hot digital recording.
Thus my reason for having many dvd and blu ray. Dvd, blu ray are generally not compressed to the extent of cd, however there are dvd's that have been compressed worse than cd.
Digital can be mastered smooth like vinyl meeting the THX standard and I have a couple of blu rays that meet the THX standard, they don't clip my pre-amp in multi-channel mode.