There are countless developers making successful careers out of it, just like medical doctors. In addition, there are many more successes on a spectrum that includes the programming equivalent of GPs, nurses, paramedics, pharmacists, drug store clerks, pot farmers, herbalists, dietitians, mothers dispensing band-aids and kisses, and aged boy scouts who happen to be in just the right place at the right time to save someone's life with first-aid.
There are countless activities in life that may or may not have viable business plans behind them. What sets programming apart from doctors and other service-based industries is that our work product is trivially replicated and shared by others. Look to literature, music, theater, and cinema for metaphors about the roles and compensation of content producers in culture and society.
But nevertheless, contrary to some open source developers, doctors are not giving their labour force for free nor living below the poverty line. The value of a doctor is very clear to our society and in Europe we happily pay our taxes to keep the universal healthcare system running. The value of software on the other hand is decreasing.