Robots are notoriously horrible at being generalists. The most efficient and effective robots have been purpose-built to do one specific task very, very well. This is why we have Roombas and not Rosies, and it's why robotic telemedicine platforms look (and let's be honest here) kind of scary, all things considered.
But, at least part of the reason that humans (as a species) are so successful is that we are generalists. And our fantasy is to be able to create robots that are generalists too, able to bring that trademark robot intelligence and speed and precision to bear on whatever task we might require. This is certainly not the easiest route to take, but under some very specific circumstances, it might be the best one, which is why NASA's Robonaut is learning to be a doctor.
All of the people who go into space are very smart, and very experienced. Most of them are also doctors. They're usually not the sort of doctors who fix people, though, because that skill (as valuable as it may be) isn't quite as useful up in space. Unfortunately, lack of doctors doesn't mean that there won't be anything for doctors to do, and while we've been lucky so far (and all astronauts are trained in basic surgery and medical procedures), eventually something bad is going to happen in Earth orbit (or on the Moon or on the way to Mars or something), and we'll need a doctor. And even if a doctor is available, what if the doctor is also the patient? Things like this are a very, very bad idea.
Rather than haul a da Vinci surgical robot along just in case, what would make a lot more sense is to just teach the generalist robot that you'll probably have up in space with you (hi, Robonaut!) some doctor skills so that it can at least perform simple procedures, and potentially get more complicated through long-distance teleoperation. NASA has enlisted the help of some real live doctors to help put Robonaut through med school:
This research is all very preliminary, so it'll be quite a while before Robonaut is asking any astronauts to please state the nature of their medical emergency. But as we start to rely more and more on robotic systems in space (as well as on Earth), having access to a capable generalist platform that can, if necessary, become an effective doctor on demand, will (let's hope) enable us to head out into the solar system with more confidence.