One difference that stands out to me is that the supply of people who can perform the job is constrained.
Other professions may be crucial - indeed, the truck drivers who deliver supplies to all stores from which we purchase daily goods are crucial - but that job in particular can be performed by almost anyone with minimal training.
Words like "crucial" don't have much meaning as far as determining job compensation: it's a supply/demand interaction. If the supply of people who can perform the job is not constrained, because the job is relatively easy to get into, then that will suppress the compensation.
It's difficult to obtain a computer science degree and perform at the level required to solicit job offers from the kind of companies that pay new graduates $200k. Imagine for the sake of argument that these jobs require an IQ of 125 or higher: then only about 5% of the population will be capable of performing at that level. (This is just an example. I'm not saying that I think programming has a particular IQ requirement.)
I showed my relatives how you 'follow the line of execution' in a program running down all the instructions. They sat back in shock, thinking how alien that job would be and how so few people are probably able to do that, and that i should be lucky (?) to have the skills to think that way.
Don't forget, too, that good teachers are experts in the subjects they teach. Teaching computer science or math well requires the same facility with "abstract symbol manipulation" that working as a software engineer does.
Chalking it up to it being the "market rate" sort of ignores how the market has failed for these other professions. They have to deal with the cost of living just like people in tech. The issue with the new grads, as the parent pointed out, is the attitude. Most could care less about this. That deserves critique.
I should also add that this dynamic does play out in other parts of the country. In other states in the US with much lower costs of living, nurses and teachers for example still have an average salary that is much lower than that of those in the tech industry, especially software development.