God’s purpose in pain