Money Course: income as a reflection of value creation outside of for-profit businesses

While I understand the concept of “income as a reflection of value creation” in the realm of entrepreneurship or for-profit business, I have a hard time seeing it translate elsewhere. Let’s take the example of a US congressperson. I would argue that, say, Nancy Pelosi creates a great deal of value in the world by creating laws that govern our country. And yet, her salary is capped at ~$225k. Or another example: a public defender provides immeasurable value in advocating for a client’s freedom, but she might start off with a salary of 50k and be able to eventually top out at maybe 150k. Granted, a congressperson or public defender may set up a for-profit side hustle and create value there, but beyond that, it seems there are whole segments of society in which the “income as a reflection of value creation” idea does not hold (including the unpaid work of a homemaker). I have, in the past, attributed this to our society’s misplaced priorities, but I’m working to challenge these thoughts. What am I missing? Does the maxim of “I get paid according to the value I create” only apply in for-profit business? Or does it translate to other areas in ways I’m not seeing? Thank you!