One difference between programmers and doctors is that there is an artificially imposed scarcity of doctors. Nobody can be licensed to practice medicine (at least in the U.S.) without completing medical school and a residency, and the number of openings is controlled by the medical schools. In contrast, you can become a very good programmer without having any formal education in the field (I know a few such people). This allows the supply of programmers to increase more quickly than the supply of doctors.