Of course, no human being is truly righteous or innocent. The Bible clearly states that all have sinned (Rom. 3.23). And all sinners deserve to be punished, eternally. That’s what makes God’s grace so amazing!
In understanding that truth, however, it must be admitted that on a relative human scale, righteous and innocent people exist. That is, some people are more moral and virtuous than others and some are more innocent. Consider, for example, a person who strives to live out the Golden Rule, or another who gives generously to the poor. And certainly most consider small children to have a naive innocence. So this question could be rephrased. “Why do little children and people who live exemplary lives suffer?”
This question reveals the assumption that there is a direct connection between righteousness and innocence on the one hand and pain-free living on the other. There may be a connection, but it is not direct. Indeed, sin eventually does lead to suffering, but suffering is not an infallible indicator of sin. Job’s friends could not see beyond this point. For them, a person’s suffering was always an effect whose only cause could be that person’s sin.
The righteous and the innocent do indeed suffer for a variety of reasons. 1) Sometimes righteous actions in a sinful world involve suffering—as when a righteous person sacrifices his or her life for another; 2) Sometimes the sins of others involve the righteous in suffering—a child may be deeply hurt as a result of his or her parent’s actions; 3) The righteous and innocent are not exempt from the painful situations which arise in life in an imperfect and sinful world—like toothaches and smashed fingers; and 4) People sometimes suffer for no specific reason that can be clarified. Job is a perfect illustration of this last experience.