Psa 34:19 Many are the afflictions of the righteous, but the LORD delivers him out of them all.
This imperfect world exposes even believers to many dangers and afflictions. While affliction can have negative connotation, from biblical worldview, God does from time to time use it as an agent of purging, purifying, chastening, to get rid of the chaff and defilement of sin, apathy, lukewarmness which clings to us. Through affliction, spiritual awakening, humility, greater faith, intensity in prayer can be realized. Here is David giving positive feedback on affliction, Psa 119:71 “It is good for me that I was afflicted, that I might learn your statutes.” The book of Hebrews highlights the positive outcome of Jesus’ affliction, Heb 5:8 “Although he was a son, he learned obedience through what he suffered.”
The beauty of the cross provides comfort that God is engaged in deliverance and salvation of His people, He delivers them out of ALL their troubles. He saves and even though trouble may find us, it shall not be to our ruin, it will work for our good for His glory (Rom 8:28). The beauty of afflication, it pushes men to draw near to God.