This is a good question. First, I do not think that so many people do undergo spiritual growth due to their own pain and suffering. It may instead lead to the opposite effect, that is, a loss of faith. However, the fact that pain and suffering do promote spiritual growth in some people is reason enough to consider how this happens.
From a psychological perspective based on studies in helping behavior, it has been found that people who observe OTHERS who are suffering begin to feel uncomfortable THEMSELVES due to a distressing increase in their physiological arousal. Therefore, to reduce the arousal, one can either try to escape the situation by means of distraction or, if this is not possible, attempt to reduce the suffering of those whom one observes. The arousal theory of helping behavior is not based so much on altruistic helping but rather on self-focused concern in alleviating one’s own personal distress. Nonetheless, I believe that in the process of helping others, concern and caring for their welfare may begin to develop, as well as a spiritual transformation in one’s own psyche. One may soon come to realize that personal suffering is not all that takes place in life, and start to pay more attention and take action to alleviate the suffering endured by other people.
I believe, however, that your question is more directed toward pain and suffering that originates in oneself rather than in others, and how this may lead to spiritual growth. I would be interested in hearing other people’s views concerning the process involved.