Put yourself in the situation. You have been diagnosed with cancer. Now what? Do you just take the suicide pill?
How about when you're old? You don't have anything to give society, right?
Elders have always been a source of wisdom in societies because they have years of experience. For this reason, many societies have taken care of their elders into the late twilight years.
Regarding cancer, the cause is unknown, but as we get more ways to treat cancer, we can extend the contributing lives of people. People stay working even in their 70's and 80's these days. In the old days, they retired and died before 65. When a person is no longer able to work, they still can contribute from their wisdom to the following generations.