That does not sound right, I would guess the most code is in enterprise and business applications and people have to use it no matter how bad it is. I would guess only a tiny fraction of code - besides hobby projects - ends up in the trash without ever having users.
I’m coming from the angle that the majority of software written is internal or B2B rather than B2C, and that most critical B2B software features are hammered out in the first couple of years of development while the remaining development cycles are for niche requests to maintain specific clients who don’t actually know what they want and then don’t end up resubscribing / even using the feature.
If you don’t think about it as a per-software criteria, but per-feature criteria, the vast majority of software features developed are probably completely ignored or even untouched compared to the “critical few”.
Very, very long tail distribution. The most executed 100 lines of code (maybe some Java class init snippet, or some Linux kernel snippet) is probably executed more per day than the per-day bottom 80% of all code combined. Maybe the bottom 99.9% of all code combined.