Personally, I believe the pay of a profession has little to do with the profession itself, and more to do with the system that surrounds the profession. There is not just the economics of supply and demand for the profession, but also at every level of the system.
For example, doctors and police offers both save lives. It's unclear to me why doctors would make 8x the salary of a police officer. However, doctors require 10 more years of schooling and long hours of practice in the early years. This is part of the system of early education that surrounds the profession. But the interesting thing is I feel most of these requirements are unnecessary and are more vestiges of an evolution of the market that define them. Doctors don't need to work such long hours in residency if we only accepted more residents. But that would lower the salary of doctors. That's one supply/demand system. Also the ridiculous educational requirements of "pre-med" is mostly a deterrent to stop more people from becoming doctors. The only reason to go through the suffering is to have the opportunity of a high salary. If the salary was low, no one would do it. Another supply demand system.
There are many economic "markets" along the way to a profession, that have little to do with the profession itself, but have a lot to do with computing the salary of the profession. Ultimately you'd think the markets would "equilibrate" to a just one. But is seems there are many "unfair" equilibria.