Cartridges tend to be reliable in the long run as long as you avoid physical damage. Leaking save state batteries can be a problem there.
Optical discs do go bad just by aging in the box.
There's another angle to this. A while back, Metal Jesus Rocks had a video about a Switch game that had an incorrect cover, and it was going to be corrected after the first production run was sold through. Which means it would be a collectors item.
He bought it, but had a "wtf am I doing?" moment afterwards. He didn't care about the game beforehand. Its only value to him is that a manufacturer mistake would make it valuable to other collectors. Which is somewhat circular logic.
Edit: to clarify, I don't think it's just about rare things, either. Having a collection at all, where you have tons of games that you don't really care about and they just sit on a shelf, is kinda insane. I don't have any moral compunction about pirating old games, so why bother? In many cases, I can even play on original hardware with SD card mods, and especially on optical disc systems, the experience is better.