Most of the time, the medical profession treats its patients in keeping with what the patients want. If someone has a broken leg, for example, then doctors set the leg, put a cast on it and let it heal.
That is what people want.
When we get sick, doctors give us the best known treatment for whatever disease we have and everyone is satisfied. However, this does not necessarily hold true when people are at the end of their lives.
What medical professionals do at the end of their patients' lives, is not what studies suggest patients necessarily want, as The New York Times reports in "We're Bad at Death. Can We Talk?"
The disconnect at the end of life between doctors and patients, stems from the fact that doctors are trained to do everything they can to sustain life. On the other hand, most patients would prefer to be let go with the least amount of pain and discomfort.
This leads to terminally ill patients being placed in intensive care units on artificial life support, when they would prefer to be placed in palliative care or return home so that they can pass away in peace.
This is something that needs to be addressed by the medical community.
There is something you can do about it for yourself. You can get advanced medical directives to let doctors know what you want, when you are terminally ill.
Reference: New York Times (May 10, 2017) "We're Bad at Death. Can We Talk?"