You are implying the amount of difficulty / effort put in by programmers is as great as for other highly paid professions. I just don’t think this is true for most cases. I’ve worked at 2 of the FANG companies where compensations is on par or higher than doctors / lawyers / consultants etc. Sure we all pulled some nights and weekends and did some reading and experimentation on the side, but for the most part it was off to the pub / go home at 6. My evenings and weekends were mostly spent doing “normal” things like playing games, hanging out with friends etc. outside of startups I don’t know any programmers pulling 80 hour weeks regularly, including side projects and self learning.
I know quite a few lawyers at the larger firms doing 70 - 80 hour weeks on a regular basis. The goal of course is making partner, but few will get there. Consultants and bankers ditto.
You are implying that effort should be correlated to pay. It isn't. The hardest job I ever had was being a bartender/barback at a very busy bar - it sure didn't pay much.
It's possible that one programmer can bring generate and capture more economic value by doing one "not very complicated thing" that gets pushed to 1 billion instances[0] than a brain surgeon can by doing one extremely complicated thing on a few dozen or hundred people per year.
'curl' is not complicated, but it clearly has incredible economic value, and has an install base of over 1 billion devices.