The analog recording methods used for LPs have to implement various pre-emphasis techniques to ensure that the best possible transfer of the audio is done, Then the pickup cartridge has to do the reverse to make the sound accurate again. Then you have to use an appropriate phono preamp to detect the tiny voltages produced by the various cartridge designs. And you still get all the clicks and pops from dust, and then the tracks wear down, reducing the high frequencies.
Optical audio discs have almost as many problems. There are many audio discs which are loosely called CDs but which are recorded in non-Redbook audio formats -- HDCD, DTS, DAD, DVD-A and SACD are some of them. I've seen a BD-A format mentioned, too. They all provide "better than CD" quality, but only in so far as the bits themselves are concerned.
In any format, though, the quality of the sound depends on the people doing the recording.