You forgot: Doctors have a strong professional organization that works for them, handles things like certification, keeps the labor supply favorable and wages high. Developers, on the other hand, swallow the "unions are bad" mentality and compete with each other in the usual "labor race to the bottom".