This may be good advice when the socially-beneficial job in question is something less expensive than medicine. But doctors are expensive. Most of us can't afford to pay for someone else to be a doctor.
Doctors in Western countries are expensive. I don't think that African doctors are as expensive.
A high school student with an interest in math asks whether he's obligated on utilitarian grounds to become a doctor.
The commenters pretty much say that he isn't, but now I'm wondering-- if you go into reasonably pure math, what areas or specific problems would be most likely to contribute the most towards saving lives?