There was once a man in the land of Uz whose name was Job. God is all-good.
Terrible things happen.
You can reconcile any two of these propositions with each other, but you can't reconcile all three. Job is a perfect man. He knows it, and God knows it. Job is so perfect that he doesn't even let his perfection go to his head. He is the first to thank God for all that he has and to take none of the blessings of his life for granted.