Math can be an end unto itself. This can come as a bit of a surprise in our prevailing culture, which needs to justify the usefulness of everything. Also, it's possible for someone to study math as a liberal art, and develop the ability to do useful things with it on their own. My observation is that the people who grudgingly learned math as a means to an end, tend to forget most of it soon after graduating. This explains the widespread but paradoxical aversion to math among engineers.
I doubt you have pure research doctors. Medicine is a field that is so dependent on treatment outcomes. There will be doctors more focused on research. However, I doubt they will stop seeing patients.
I know for a fact that pediatric oncology and hematology is entirely driven out of a research hospital or university. But doctors there publish but also treat.