This question is answered authoritatively in the book itself (see Job 42:7), where God is represented as saying, "My wrath is kindled against thee and thy two friends; for ye have not spoken of me the thing that is right." One gets a clearer idea of the book by regarding it as a symposium on the problem of suffering, each speaker being a representative of a school of thought. Each speaker keeps to the same aspect of the subject but all agree in regarding unusual suffering as an evidence of unusual sin. They imply that in Job's case, he being outwardly so good a man, his sin was aggravated by hypocrisy. This was unjust, because, as we learn by the first chapter, it was precisely because he was so good a man that his affliction came upon him. The author of the book evidently wished to administer a warning to the people of his time against being uncharitable in their inferences.