Everything always ends up being priced by supply and demand, in the long run. If you distort the market too far, you get shortages and wastage, and a black market where things are priced according to supply and demand. Labor isn't an exception.
Wage, as determined by supply and demand, is the signal for how valuable one more worker at some job is to the community. That is to say, it's a mix of how valuable the work is over all, but also how much the community actually needs one more person doing that work.
None of us are entirely self-sufficient, so If you want to live, you must contribute to the community something of marginal value (that is, something there's value in even more of than what the community already has), to receive what you need. There's no escaping that: all there is is all we produce. And compensation is about the value you produce as judged by others.
Wages for the most part stay pretty close to that ideal. I think people forget how important the "supply and demand" part is.