According to most economics textbooks, our wages are determined just like any other price: by supply and demand. People supply their labor, and companies demand it, creating a market for labor.
In broad strokes, the standard theory is pretty straightforward. When a lot of people can do the same job, the wage for that job is pushed down (because more people can supply their labor). When it takes special skills or education to do a job, wages are pushed up, because fewer people can supply their labor. On the demand side, employers are willing to pay more for an employee that can make them more money.
Economic theory actually gets really specific about exactly how much each person is paid. According to the theory, when companies want to hire a new worker, they will look at how much money they think the worker will bring into the company. Economists call this number the worker’s marginal product of labor (MPL). It wouldn’t make sense for a company to pay someone more than the amount of money they’ll bring in, or the company would lose money on the employee. It’s also no good if they try to pay the employee less than what they’ll bring in, because some other company could pay a higher wage to steal the employee away and still make money on the deal. So wages are set exactly at the amount of revenue the new employee will create: their marginal product of labor.
This theory describes a ‘perfect’ market, where all the employers are trying to maximize profit, there’s lots of competition and everyone is able to work as much as they want.
Pretty much everyone recognizes that’s not always the case. But some economists think the theory is close enough to the real world to be useful, and others think it’s just way off. They think it ignores important parts of how the real world works — things like unemployment, power inequalities and unions.
First off, the idea of ‘labor productivity’ doesn't make sense for every job. You might be able to reasonably calculate how much an additional sales clerk or factory worker will make you, but for a lot of jobs it’s not so clear cut. And it’s even harder to apply the concept to non-profit sectors like public education, medicine or security where the employees aren’t bringing in revenue, but are instead making some kind of public good (like education, health or safety).
Also, in the theory, wages are held up by competition between employers: if you think you’re not being paid what you’re worth, you can quit and get a higher wage. But in the real world that’s a pretty risky strategy; you might end up stuck with no job instead! Persistent unemployment changes workers options in a way that can give employers more power in determining pay.
Workers can also become more powerful when they’re able to organize into unions. Any one worker might not have much say about their wages, but millions of workers acting together can force employers to set wages higher, or provide other benefits like better working conditions. Similarly, governments can create regulations like minimum wages that bring wages up as well.
Supply and demand also doesn't say much about the value of a job. A lot of the most socially beneficial jobs aren’t the best paid: talk to any public school teacher or nurse about this one.
All of that’s not to say supply and demand is all bunk; it’s still a pretty powerful idea for explaining why some jobs are paid more than others. It’s just good to remember that it's not always the whole story; power often plays a big role too.