Here is a wonderful video explaining the book of Job. Apparently Job was trying to earn God's blessing rather than trusting Him. We know that good works does not provide salvation.
All of us have become like one who is unclean, and all our righteous acts are like filthy rags; we all shrivel up like a leaf, and like the wind our sins sweep us away. Isaiah 6:46
A moralist is fr more dangerous than being a hedonist. The prodigal son was a hedonist but the other son was a moralist. One must have a real relationship with God. Satan wanted to destroy Job, but God used Satan on a leash to make job see the truth. Take time and listen to this as there is a lot of good stuff in this. Learn and grow.
The video is is about 45 minutes but worth it.