As I recall, the Book of Job was supposed to be about a bet between God and Satan as to whether Job (God's most faithful, and also most prosperous, servant) would continue in his faith if Satan took away all of his prosperity. But it's been a while since I've read it - let me look up that part and get back to you.
Job is right and his friends are being assholes. I'm not sure you're necessarily supposed to be able to tell that, though; the latter part of the book will make it clear. I'm not going to spoil the rest of the book unless you want me to, but the core message is: "Sometimes bad stuff DOES happen to good people. But who are we, really, to question God in it? God will do justice in the end." This is meant to counter the common wisdom of ancient times that if you suffer, it's ALWAYS because you deserve it and God is punishing you. It's a particularly strong counterpoint to the rest of the Old Testament's emphasis on the idea that people need to do what God says or he will send curses upon them. The idea is that while sometimes bad things happen to people because the person was sinning, if you know your conscience is clear and bad stuff happens to you anyway, neither you nor anybody else needs to assume that you were sinning and just don't now about it. Shit happens even if you're morally in the clear.
no subject
no subject
no subject