I don't think this is the reality. It is part of it, but people get paid different salaries, why? Some are more productive than others. Aside from leadership's (and society's) biased ability to determine value, these people theoretically get more because they contribute more.
In my experience, productivity effects on salary is a rounding error. There are only two significant contributing factors for salary: 1. Your home address and 2. Your visa status
Productivity might get you a 5k raise more over your colleague on a 160k salary. Meanwhile the same engineer in Taiwan is more productive than you and getting paid 40k while working for the same company on the same product, and putting in more hours to boot.
This is a naive view. Companies will literally pay you as little as they can get away with. If they think they can hire someone “equivalent” according to HR for less money they will often do so. Actual contribution means nothing unless you’re willing to walk away. I’ve literally seen an intern with less than one year of experience when hired into a company where a senior architect who has been at the same firm for 16 years made over $40k less than them. The former intern was great. I had no real complaints. And he was more ambitious than the senior architect. But he stayed with the company two more years before jumping ship for another significant pay raise while the senior architect is still there making about the same amount as he did five years ago. It doesn’t matter how much value the senior architect delivers if he doesn’t demand his increase in pay.
while productivity is correlated with salary, generally the ability to ask for a raise, to defend your pay and office politics navigation would be more impactful on average