It takes someone about 12 years to become a doctor. Plus it costs at least $200,000 to go to medical school and it will take them years to pay off their student loans.
Keep in mind a Doctor once he is off residency will see thier income rise throughout their career. It will not drop, even if they change jobs. Not the same for an airline pilot. Another thing to note is that no one can go and simply get their license in 0 to 90 days, unlike the fastpaced programs that exist for becoming a commercial pilot. The more harder and expensive it is to get your ratings the less people will want to do it. That's what you want if you want to see your certs to be worth anything. if everyone can get a comm lic it isn't worth crap.
I have no idea why people keep comparing pilots to doctors. When you don't show the true woes of the industry you get the starry-eyed shiny jet kid running to get into the rightseat. Hopefully with all the lights on the problems in the industry in the last two years the SJS people will think twice beforing starting training... thats a good thing for everyone who already flies for a living. Supply and demand.