For the money and prestige. Becoming a doctor is the most sure fire way for someone who is smart and wants to work hard to earn a high income. Yes, there are people who make more money, but in general those all come with a much higher level of risk.
When you're in high school medicine and law are pushed as the two options for anyone who gets decent exam results. Rightly or wrongly medicine is seen as prestigious. I think a lot of people don't have an accurate idea of what the profession is like and they go for it for the wrong reasons. Maybe they've watched too much ER.
Med school is 4 years. You're a doctor once you graduate from med school. Then you do residency to train for your specialty. That can be anywhere from 3 to 7 years (most being 3-5). Then you can (but don't have to) do a fellowship to subspecialize. Fellowships vary in length.
So for example to become a cardiologist, you'd do 4 years of med school, 3 years of internal med residency, and then a 3 year cardiology fellowship with the option of doing another fellowship in interventional cardiology (doing stents for heart attacks), electrophys (treating arrhythmias), etc. If you want to do primary care, you just do med school then a 3 year residency in family med, internal med, or pediatrics.
A guy down the street from me is an ortho. He threw shot put in college and did all his medical training in Chicago. He got a mid six figure signing bonus to join his current orthopedic group when he finished his residency. He was able to buy a $1 mil+ house with cash after working for 5 years as a surgeon. He rarely works more than 40 hours a week and gets 4 weeks paid vacation.