The basic problem is supply and demand. Oxygen provides more value than devs, but the supply is huge, so we don't spend that much on it. Devs aren't as plentiful as oxygen, so there is less supply. They do provide significant value to companies, though not as much as oxygen, so there should be demand. What the op and I are confused by is how, given the fairly copious supply of devs, why are some firms still shelling out 200k? I've seen other organizations paying $40k and having no troubles filling their positions with commensurate levels of talent.
You say that people are underestimating their own value when they work for $40k. I believe that firms are significantly underestimating the supply when they're paying $200k. I'm not sure which of us is correct.
Goes to show that creation of wealth and accumulation of wealth are not the same thing.