As odd as it sounds, I'm rather a fan of the book of Job. There are many people who cannot stomach the book, and even more that reduce it to the detriment of its point.
In any case, it is the most misunderstood book of the entire Bible. Its very premise angers us, and its conclusions deny us our sense of control, and challenge our very notions of justice. It is a hard book to digest, but I believe the primary reason is that we do not treat it as a whole: focusing on the beginning narrative, and skipping the vast majority of the book which constitutes dialogue. If we are to understand Job, we must first recognize that the meat of the book is in the dialogue, and not in the story.
The Purpose of the Narrative
The purpose of the narrative intro is not to tell the moral of the story, though it certainly anticipates it. The purpose is the same as any other kind of intro, to set the context of the book. First of all, the subject: theodicy, or more specifically in this case, why do good people suffer. This is a complex question, and the book doesn't actually set out the answer it, as we will see.
But the narrative sets up many different things. First of all, it rules out a possibility which is very important. Job does not suffer because of anything wrong with Job. Job is completely righteous. If you don't get this down, you miss everything.
Indeed, in most interpretations I hear of the book, people keep trying to get around this initial fact. However, to try and find out why Job needed to go through this trial, or why he deserved it, is to contradict the entire premise that the book is founded upon: Job is righteous, and does not deserve what he receives in any fashion.
Second of all, we see why Job does suffer. There is a wager between God and Satan. This is something else we tend to try and get around, saying that God wasn't really wagering with Satan, but simply manipulating him to accomplish His goals for Job. However this contradicts the plain sense of the text. According to the text, the wager happens because of God's faith in Job. I repeat, God had faith in Job. He trusted Job to come through. Mind you, He has the advantage of omniscience, yes, but that doesn't change the fact that the reason why Satan wishes to attack Job is because God has faith in him.
This cannot be extrapolated into supposing this is why all good people suffer. The text doesn't lend itself to that. Indeed, Job is treated as a special case. Therefore we must conclude that this is simply the context for Job. We must also recognize that God is right, and Job does not betray Him. Even in Job's strongest laments and deepest anger, he does not loose faith in God, but merely seeks God for an answer.
If we are to consider the dialogue the thrust of the book, what is its message? There are three opinions that are basically stated: the friends/Elihu, Job, and God. Job is insisting on his innocence, demanding an audience with God to settle the matter. Job's friends and Elihu are criticizing Job for this claim, and telling him to admit that he is a sinner and repent.
But what is most interesting is God's opinion. God doesn't stake a claim on the issue at all. He merely rebukes Job's criticisms of His character, but punishes Job's friends for their horrendous theology.
Then what can we conclude is the message?
I would say that the book as a whole is a rebuke of a popular theology, namely the one expressed by Job's friends. There is a truth that says that God blesses the righteous, and brings the sinner to ruin (Proverbs 11:21). However, what many do is flip this truth around and conclude that those who are blessed are therefore righteous, and those who are in ruin are sinners. This causes one to praise the rich and powerful and look up to them, while condemning the poor and disenfranchised. (Remember when the disciples thought that the blind man was a sinner, or when they were shocked that it was difficult for a rich man to enter the kingdom of heaven?)
The book of Job stands in strong contrast to this theodicy. Indeed, the entire context of the story is a righteous man in ruin! When have that in our minds as we read, we see how terrible the comments of Job's friends really are, as they attack the man they are supposed to be comforting.
Also, Job maintains his goodness. Though he criticizes God many times, he never curses God, but instead seeks an audience with Him. He demands that God answer his questions, much like some of the laments in the book of Psalms. Though God never answers these questions, He comes to Job personally, and demonstrates His power. What's more, Job submits! He is satisfied that God is in control, and he need not worry.
One of the greatest mistakes that we make is to try and figure out why this needed to happen to Job. Sometimes we conclude that there was a hint of pride in him. Other times we conclude that God provided this as a means of Job becoming closer to Him. I think both of these undermine the premise of the book. The first is to side with Job's friends, the very ones that God condemns at the end of the book. The second flies in the face of the prologue.
As Christians, we should not be shocked by the book of Job. Doesn't Jesus promise that we will suffer for His name? Doesn't He promise persecution? Then why are we shocked that things don't go wonderfully for Job? Why are we shocked that Satan attacks him? A Christian should instead recognize in Job a similar situation that we are called to be in.