I don't know how you get that idea unless you are talking about the handful of C-level positions at tech giants. Otherwise switching your job every few years and increasing salary/position each time is generally the more profitable path than staying at a single company and waiting for promotion.
The really valuable skill (from a dollars & cents perspective) is to be able to provide business value to _the business you’re employed at_. That might not transfer anywhere else.
Eg I doubt my skills apply to a young startup- I’m a specialist (ML research), they need a generalist.
If I work at Google on search & get really good at solving political problems related to search, that’s a super valuable skill set _to Google_ but probably not to anyone else. I’d probably get promoted and/or get big bonuses. It also probably means that, _ceteris paribus_, I’m a worse coder, as I’m spending less time focusing on tough coding problems.
If you’re not paying your devs substantially more than industry average (like several times more) they’re probably not that abnormally good.