The book has always been understood as a theodicy, and I read it that way (incidentally, I haven’t read it in quite some time, so this whole post if off memory – if a re-read prompts me to reconsider anything I write, I’ll post it).
So what is God’s explanation, at the end of the day, for Job’s troubles? I find it a fascinatingly telling one. God basically tells Job “Stop questioning, because the answer doesn’t matter. If you trust me, then you know that everything I do has a purpose. Knowing what it is is past your pay grade. Just know that I am a good and just Lord, and trust me”.
And so God gives Job double of everything he had before (pointing out that this doesn’t get rid of Job’s grief from his previous losses is missing the point of the symbolism), to prove His point – that even if Job doesn’t know how things are going to work out or why they’re happening it doesn’t mean that God isn’t going to work things out, like He has promised us.
Aquinas (and I’m sure he worked off of Job) gave basically the same answer to the problem of evil, which was roughly this: Who cares? We know God is good. Thus any evil that exists has to have an explanation. What it is is irrelevant. The important thing is that it exists, and we know it.
And that’s always been my understanding of the problem of evil. I don’t get it. I don’t get evil. I’ve had friends (you must remember that roughly half of my friends, and I, are still teenagers) rail against the Heavens because of horrible things that have happened to them. Legitimately horrible, not just melodrama. Sometimes it really is hard to see God behind all of that. But He’s there, and He’s just. Things got better for Job, too.