It’s good to be reminded of this from a standpoint of empathy, but at the same time I think it’s missing the fact of the matter: we don’t get paid more money because we work harder. That’s just a remnant of the Puritan work ethic. The economic fact is that we get paid more money because there are fewer people available to do what we do. Generally speaking, anyone can be a line cook, a bricklayer, or a janitor. When (more or less) anyone can do a job, it doesn’t pay as well because the available workforce is ample. If a software developer got paid as much money as a line cook, then software developers would be deployed at tasks that don’t warrant their more valuable time given their (relative) scarcity in the workforce. Deploying scarce resources in a suboptimal fashion is bad for everyone in an economic sense. It’s like using copper during the war effort to make brass bathroom fixtures instead of wiring for airplanes—it’s a poor (and potentially disastrous) use of the resource.

You can see this at work in NYC right now: the relative ease at acquiring financing means there are a lot of really dumb startups here right now with stupid ideas and no real market that are tying up valuable engineering talent which makes recruiting harder for legitimate startups that are genuinely creating value. Imagine if all the engineers who worked at Google during the early days were instead tied up working for Pets.com and Webvan such that Google was never really able to get off the ground and folded. That would have been bad for everyone, because Google ended up creating a lot of real value and Pets.com did not.

This same reasoning, I think, applies to the question of why CEOs get paid such astronomical salaries. The answer is that the kind of people with the skills to run a large company are extremely few and far between. Sure, a lot of them do fail at their jobs despite getting paid so much money; but that's not a reason for a hew and cry about how much they’re paid—it’s (usually) simply a testament to how hard the job actually is to pull of successfully. (Incidentally, it’s a common lament that the people at the top get paid disproportionately more than everyone else. But that’s just because the scale doesn't increase linearly—it grows exponentially. I'm not sure what the outrage against such a fact is—if you’ve taken differential equations you’ll remember that myriad complex mechanical, electronic, chemical, astronomical, biological, economic, etc. systems have nonlinear characteristics.)

So the idea is that salaries for scarcer resources are generally higher such that only enterprises creating sufficient value (i.e., profits, or at least a general confidence in future profits) to pay for them are the ones who get them. It’s certainly arguable whether this is what occurs in practice; and—while there are always exceptions, transients, and outliers—I think by and large it’s a good approximation.

This is kind of tangential to @jacquesm’s point, I know, because he’s simply pointing out that we should be cognizant that we get paid more for arguably easier work—but all the same I think it’s important to keep in mind that making things more ostensibly ‘fair’ may not always be in everyone’s best interests in a larger sense.