The pain of a terminal condition can be incredible. I have a friend right now that has days if not hours to live due to a glioblastoma brain tumor; inoperable in her condition and has and is causing strokes. She has had no relief from pain and any amount of drug therapy to relieve the pain just puts her out. She no longer has any muscle control including swallowing. Imagine a continuous migraine headache. She would prefer to say goodbye. There is nothing medical science can do for her anymore. Her husband and kids are living a nightmare watching her slowly die in painful agony. Just think about that.
Palliative care is amazingly advanced and, as a last resort, doctors can induce a coma. There is no reason to kill anyone.