You're treating this like monetary value is the only motivator for people. Let's pick on medicine; a general practitioner consistently makes less money, but they tend to have greater, more regular contact with their patients, which may be a strong motivator for them over becoming a surgeon for more money. And to boot, the surgeon is more specialized, so they have simultaneously learned less than the Gen Practitioner, but more specificity within their selected specialization. This is similar to boot camps, that provide a very narrow skillset that give someone the best chance of getting hired into that very narrow position type; where as, someone like the OP and I are happy with our broader knowledge that gives us different benefits.
And probably most importantly, what do I care that someone else has optimized their job path for monetary gain. I could assign 5 minute increments to worrying about each person and still not make it through all the idiots that are employed in the tech industry in my lifetime.