The Book of Job
Most descriptions of what the book of Job is about don’t match the actual book of Job.
No, its not an explanation of why God allows evil to exist, not really. That doesn’t explicitly come up at all. The beginning and end where Job loses all and then recovers all is basically a frame story for the disputation.
My own point of view, completely uninformed by scholarship, is that (1) its a poetic recognition that evil happens to good people and is evil and (2) its a long and poetic argument between people who don’t believe in a robust afterlife (Job’s friends) and people who do (Job). The friend’s keep saying that God is just in this life and Job keeps saying, no, not in this life, so there must be a life to come.
It feels fictional to me. The prophets say that Job was real and I’m going to believe them, obviously, so could one say it was a fictionalized account inspired by something that actually happened?