CDs can support 90+dB of dynamic range, which is pretty great, with much less distortion and noise. A good classical recording can show this off pretty well.
On the other hand, 80s club music was presumably mixed and mastered with vinyl-style distortion (and other features such as rumble, crackle, hiss, etc.) in mind. (Modern producers often try to replicate the pleasant saturation of analog equipment – and sometimes add vinyl-sounding artifacts, for better or for worse.)
A well-mastered digital recording should (and does!) sound great, but I think the problem is that many CDs aren't well mastered and many were overly compressed, sometimes with terrible clipping, in service of the dreadful "loudness wars."
In 2022 most dance music is produced digitally to begin with, and DJed digitally as well; presumably mastering engineers and DJs have figured out how to make it sound good when it's played in a club.