Exactly. And there's also the factor of leaving your entire family in insurmountable debt and poverty. It's not about putting a price on a life, it's about comparing the sick person (or family's) two priorities: keep living no matter what, vs. ruining their family's lives for many years even after death.
Yes, OP, it's disgustingly tragic -- but so is the alternative, in extreme cases like this. Such is the way of things in a resource-limited life. (resources = health care and money.)
Arguably, spending every last cent of your family's money on your own health care is the economic (and moral?) equivalent of ditching your penniless spouse and family.
Of course in reality, we aren't often presented with such an extreme case, and hindsight is always 20/20.