Job is set in ancient times, before the structures of modern society. The main character, a man called Job, asked why there is pain and suffering in God's world. He rejected the answers of his friends, appealing to natural features such as whirlwinds (37:9), and it is from the whirlwind that God replied (38:1). The book concludes with such a glorious vision of God that the question seems irrelevant.
"The ancient book of Job is an extended reflection on the vexed question of why bad things happen to good people. It is a story that challenges approaches to life and faith that are based on simplistic religious equations: do good and you will be blessed; do wrong and you will be cursed. The very fact that a traumatically painful personal story of undeserved tragedy is at the centre of this poem means we can never hide behind abstract theories or debate human suffering at a safe distance." 
The book is dominated by the unhelpful comments of Job's friends. The first to speak is Eliphaz, who is sure that the innocent do not suffer (4:7) but the guilty get their just desserts from God (4:9). This leads inevitably to his conclusion that, despite the evidence, Job must have sinned. And so he urges Job to accept his suffering as chastisement from God, sent to make Job holier (5:17). But Job challenges any accuser to show his fault (4:24). Then Zophar has his say (11:1): he doesn't believe that Job is innocent, because he accepts the dogma that all are sinners. He reaches the same conclusion as Eliphaz, but from a different starting point.
See also Barry Stronge's paper on this book, making the point that Job should be read in the light of other passages such as James 1:13.