Timothy Keller, in Chapter 2 of his new book “Walking with God through Pain and Suffering,” writes:
[Saint] Gregory taught that…suffering in the world is of many different kinds and serves “a number of purposes in the divine economy.” Some suffering is given in order to chastise and correct a person for wrongful patterns of life (as in the case of Jonah imperiled by the storm), some suffering is given “not to correct past wrongs but to prevent future ones” (as in the case of Joseph sold into slavery), and some suffering has no purpose other than to lead a person to love God more ardently for himself alone and so discover the ultimate peace and freedom. The suffering of Job, in Gregory’s view, belonged to this last category. A personal God is a purposeful God, and in the Bible, it is possible to recognize different ways that suffering operates in lives.