The retribution principle is simple: the righteous will prosper and the wicked will suffer. The corollary is that prosperity and suffering are always deserved. If someone suffers, it is because they are wicked, while prosperity is evidence of righteousness. Christianity puts another twist on this. Ultimate justice comes, not in this life, but in the age to come.
The book of Job puts the retribution principle on trial. There are three aspects to the trial. (1) The challenger suggests that people are righteous only for the reward, without the reward righteousness (i.e. behavior pleasing to God) would vanish. (2) Job’s friends are convinced that he must have done something to deserve his suffering. (3) Job, on the other hand, knows this isn’t true and challenges God’s justice. Where can this go? And a related question: are Christians righteous only for the reward (heaven)?
In part three of How to Read Job, John Walton and Tremper Longman III dig into the retribution principle. The idea that the world runs on a principle of justice was common in the ancient Near East, and remains common today.
Even among Christians today it is common to encounter the belief that if someone is doing well in life, he or she must be doing something right – pleasing God and gaining his favor. Inversely, people quickly jump to the conclusion that if life takes a bad turn, there must be a reason. (p. 90)
Some Christians will argue that all suffering is deserved because all sin, prosperity comes from undeserved grace (but, whispered, is probably a sign of God’s favor). This isn’t on the table in the book of Job. We know from the get-go that Job is righteous in the eyes of God. Righteousness doesn’t mean sinless perfection, but a life lived to please God.
Also not on the table is a hope for justice in the age to come. The Israelites did not have an expectation of an afterlife in communion with God. Justice, including reward and punishment, was a this-worldly affair. Because this comes as a surprise to many Christians, Walton and Longman devote a chapter to defending this idea. The resurrection is a later idea, still controversial in the New Testament, and, except for the book of Daniel (esp. 12:1-3), absent from the Old Testament.