I'm not sure I follow your math. 5% of roles are principal jobs, but devs with 20+ years are not 100% of the talent pool. This doesn't hold up if devs with 20+ years are are 5% or less of the talent pool.
Still, given "20+ years of experience" represents all programmers of ages, say, 45-65 - or two decades worth of CS graduates - I feel that cohort far exceeds the market for principals? If you think it is smaller, maybe that's because everyone who wasn't in the top n% had to leave?
Although other commenters have pointed out that the growth of the industry counters that, that won't last forever!
https://www.freecodecamp.org/news/2-out-of-3-developers-are-...
(oddly enough, the 'average' programmers entire career was 10 years last I checked. People seem to burn out and move on..)
And so, the industry is mostly populated by inexperienced people and many of its pathologies and adverse outcomes are due to this.