You have granted me life and steadfast love, and your care has preserved my spirit. Yet these things you hid in your heart; I know that this was your purpose.
Job believes in the sovereign wisdom of God. He trusts with an unwavering faith in the purposes of God. He knows that none of his present sufferings are a surprise to God. Somehow God has had a purpose in Job's pain. It might have been hidden from Job, but God knew what Job would face and let him experience it. Nothing is truly accidental from that perspective.
Job's struggle is one we all have. It is what happens when we compare the good times to the bad. It is in that exercise that the challenging questions emerge. Job had been so blessed by God's grace (steadfast love is the poetic Old Testament term for it) for so long. And now in the humble loss of everything he held dear, he has to wrestle through the purposes of God when life is not as good as it once was. And the problem of pain is not necessarily lessoned by the knowledge that God has a purpose even in pain.
The assumption that all pain is bad and is symptomatic of judgment on sin is the stance of Job's friends. But that is not what Job knows by experience. The reality is that pain can be a good thing. God designed pain to save our lives. If my hand did not feel the pain of the fire, I would burn to death. And at times pain is a mark of health and growth. For instance, I woke up a little sore this morning from a workout yesterday. But that is a sign of health. It means that I pushed my body in a healthier direction. And the pain is a temporary discomfort that is a good thing.
God's grace is real in both the good times and the bad times. Loving God and accepting His purposes in my life means that I take from His hand both pleasures and pains. It means that I trust His goodness even when I am not particularly happy about my life circumstances. And it helps me to find the source of my strength, rooted in my faith in the holy purposes of the God Whose face I seek. I can desire God, even in life's deepest struggles.