The book of 2 Esdras is usually grouped with the Old Testament Apocrypha, even though that really isn’t accurate. It’s actually a composite book containing three documents. The largest is a Jewish apocalypse from the late first-century (also known as 4 Esdras), likely written just after the destruction of the temple in the aftermath of the Jewish Wars. It’s book-ended by two, shorter Christians works: the first from the second century and the other from the third century.
The writer of the Jewish apocolypse wrote from Ezra’s point of view and, in a literary floruish, set the piece in Ezra’s time period in the aftermath of the sack of Jerusalem and the exile to Babylon. In reality, the writer used Ezra as a foil to describe his own thoughts on theodicy in the aftermath of the destruction of the second temple, some time soon after 70 A.D. In this excerpt (2 Esdras 7:1-74, from the RSV), an angel talks with Ezra as he ponders God’s goodness:
When I had finished speaking these words, the angel who had been sent to me on the former nights was sent to me again, and he said to me, “Rise, Ezra, and listen to the words that I have come to speak to you.”
I said, “Speak, my lord.”
And he said to me,