It can be called "karma" (though most people misunderstand the meaning of the word), or destiny. I've seen two friends, one a very, very dear friend, live very healthy lives with good diets and habits, and succumb to cancer at 28 and a young 50.
What really matters is not how long we walk the earth, but what our destination is after we leave. What lessons we learn here.
I've had some severe illnesses in my time, and they have taught me lessons I value like treasures.
Soldiers call it "seeing the elephant," and there are many ways to do this.