The book of Job is a parody
Sometimes I picture its author looking down at us and shaking his head.

Is the book of Job a tragedy or a comedy? The answer might seem obvious to you. It is perhaps obviously a tragedy: Job suffers both great loss and great physical pain. Lots of people die. Children die. Like almost all tragedies, the book is about suffering and its meaning or lack thereof.
Or maybe it seems obvious that it’s a comedy. The book has a classic comedic shape. Maybe it isn’t exactly funny, but it is placed inside a frame that is simple and even naive, with a happy ending just to be sure we understand that it is a comedy.
There is a tension between Job’s comedic and tragic elements. Some scholars have dealt with this by noting the lack of unity in the text. They point out that there are deep contradictions between the Job of the prose prologue and epilogue and the Job of the rich poetry in between. Perhaps, they’ve conjectured, the author took a traditional folktale that was widely known by his audience, cracked it open, removed the middle, and inserted his own words. Thus, while interesting, the frame story of the prologue and epilogue has little interpretive value. It may give the book the shape of comedy, but only as an unintended consequence.