We allow people to donate a kidney to another person, and that carries a significant amount of risk, and only one person benefits.
We allow assisted suicide in many places.
We allow people to assume great risks in auto racing, professional football, and boxing, and that's just for entertainment.
We allow doctors to treat COVID patients, sometimes without even proper PPE, knowing that a significant number will catch it. Many doctors are also not young, not in good health, and have preexisting conditions.
So all of this is allowed, but when the potential result is a vaccine that could save millions of lives, somehow this is unethical?