When a young person dies, the grief is compounded by the terrible question: why? The sages wrestled with this question and offered an answer that was as unsettling as it was compassionate. The Talmud (Shabbat 13b) records that sometimes, God takes the righteous young precisely because they are righteous — to spare them from a future of sin.
The Book of Wisdom expresses this idea: "He was taken away lest wickedness should alter his understanding, or deceit beguile his soul." The young person who dies righteous is, in this view, a soul rescued by God before the world could corrupt it.
The sages illustrated this with the case of a young man whose early death seemed inexplicable. He was pious, learned, devoted to Torah. His community was devastated. Why would God take someone so full of promise?
A sage was asked and replied: "God saw that this young man's path, had he continued living, would have led him into a situation where he would have been forced to transgress — perhaps through persecution, perhaps through temptation, perhaps through circumstances beyond his control. Rather than let him fall, God gathered him in while his soul was still pure."
This teaching was not offered glibly. The sages knew it brought cold comfort to grieving parents. But they also knew that without some framework for understanding premature death, the bereaved would be left with nothing but raw, purposeless anguish. Better a difficult answer than no answer at all. Better to believe that God acts with hidden mercy than to believe He acts without reason.