Doctors don't make vaccines. Pharmaceutical researchers do. And pharmaceutical manufacturers wouldn't blink twice before selling you drugs that they know are harmful, there's plenty of well covered precedent for that. It's not that the medical field is more or less moral, it's just that in the case of vaccines, they actually perform well with no significant side effects so there's no reason to engage in morally questionable business practices to sell them