When my mother got terminal cancer, the last few months of her life became her most valuable. Those last days were scarce. In a way, they are infinitely more valuable than all her other days, because she knew at that point that she had a finite number. Until you are given a terminal diagnosis, you feel infinite, and perhaps -- with the innovation in life extension -- you actually could live forever. Of course accidents still happen and with more days to live, the law of large numbers kicks in, so we'll probably never live forever, but I digress.
Point being, the last days are the most valuable and the treatments to keep us alive under terminal conditions are expensive. It's expensive to fight death and few want to die. Most believe not dying to be the most important and valuable thing in their lives, so it is understandable that the last years, in general, cost the most to keep.
The only alternative to this situation is to embrace death. Make it normal. Make it not scary. Treat the emotional aspects of dying rather than the conditions that cause death.
We are a long way from a society like that.