In practice, though, it's far more likely that the the disc will get corrupted from small scratches.
[1] https://www.npr.org/sections/alltechconsidered/2014/08/18/34...
https://www.nature.com/news/2001/010628/full/news010628-11.h...
If you handled everything with white gloves and carefully moved the CD around it would probably last forever under a realistic scenario (you left it in a closet, didn't move it around much, etc.).
I have a bunch of original CDs from my first music collection that still work after ~20 years based on spot checking some of them 5+ years ago. Even with hundreds of playbacks.
But, I do have a handful of CDs that I remember having issues. They skip in certain spots due to artifacts on the CD. The real world happens. I don't remember what happened exactly in each case, but I'm guessing they got scratched. Like maybe I didn't put it fully into the black binder that held 200 CDs and I hit a bump in my car which caused the binder to jump around and an edge of the CD got clipped by the zipper, who knows.
Also burnt CDs seem to have a much worse shelf life. They are much more susceptible to being damaged. I don't know exactly why at a technical level but for sure I've had more burnt CDs fail over time. That becomes an issue when you want to back things up.
With mp3s, I can just put thousands of songs on my computer and everything works all the time. I never had an mp3 not play or skip unless the file itself was corrupt initially. They are also a heck of a lot more portable. You can put your collection on your phone, throw in some earbuds and now you can go on a run, or a 6 hour plane trip. You ever try running with a discman[0]? I have. It doesn't really work too well haha.
[0]: https://images-na.ssl-images-amazon.com/images/I/41305EZ51FL...