In the rush to get CD’s to market in the format’s early days, record companies used the old production masters made for the pressing of LP’s. Those LP-mastered tapes had their low frequencies filtered out to make the records playable by the cartridges the vast majority of consumers owned, and the highs were boosted to compensate for the losses incurred during plating, pressing, etc.
Newer recordings in most cases have not not mastered for LP pressing, and the sources used for mastering haven’t been subjected to the same filtering as were the older tapes. But as many have noticed, they ARE being compressed so as to create a higher average-level (louder) signal.