Why should a doctor be forced to treat someone he thinks to be a hopeless case, regardless of whether he is being paid or not?
Because that's what doctors do; treat patients.
However, I do see your point: many doctors refuse to perform abortions, prefrontal lobotomies, "female" circumcisions, etc.