The Lord does permit afflictions in our lives for our spiritual growth and good.  Whenever we are in the midst of pain and suffering, it is hard to believe that it will benefit us.  The key is whether it draws us closer to God or makes us angry with God.  Our challenge is to be patient in affliction and trust the Lord.  The Apostle Paul said to the Romans, “…we glory in tribulations also: knowing that tribulation worketh patience; And patience, experience; and experience, hope…”  (Romans 5: 3-4 in the Bible)

D. Todd Christofferson Wrote a Great Article on This Subject

“Adversity in life should not surprise us. Whether it arises from our own sins and mistakes or something else, adversity is a fact of mortal life. Some people think they should be spared from any adversity if they keep God’s commandments, but it is “in the furnace of affliction” (Isaiah 48: 10 in the Bible) that we are chosen. Even the Savior was not exempt:  ‘Though he were a Son, yet learned he obedience by the things which he suffered;

“And being made perfect, he became the author of eternal salvation unto all them that obey him’ (Hebrews 5: 8-9)

It is what makes life more than a simple multiple-choice test. God is not just interested in what we do or don’t do but in what we are becoming.  If we are willing, He will teach us to act as He acts rather than simply to be acted upon by other forces (see 2 Nephi 2: 14-16 in the Book of Mormon).  We must learn to be righteous in all circumstances.  We should approach that challenge now knowing that our Heavenly Father will sustain us. But it is crucial that we turn to Him. Without God, the dark experiences of suffering and adversity tend to despondency, despair, and even bitterness.  With divine help, ultimately consolation replaces pain, peace replaces turmoil, and hope replaces sorrow. God will convert trial into blessing and, in Isaiah’s words, ‘give … beauty for ashes’ (Isaiah 61: 3 in the Bible). His promise is not to spare us the conflict but to preserve and console us in our afflictions and to consecrate them for our gain (see 2 Nephi 2: 2 in the Book of Mormon).

While our Heavenly Father will not force His help and blessings upon us, He will act through the mercy and grace of His Beloved Son and the power of the Holy Spirit to sustain us when we seek Him. We find many examples of that support around us and in the scriptural record.”

Old Testament Examples

“In the Old Testament we see obedient Abraham patiently waiting over many years for God’s promises to him—lands of inheritance and righteous posterity—to be fulfilled. Through famine, threats to his life, sorrow, and testing, Abraham continually trusted in and served God and was in turn sustained by Him. We now honor Abraham as the ‘father of the faithful.’

Abraham’s grandson Jacob fled from home, alone and apparently with little more than his clothes, to escape the death threats of his brother, Esau. For the next 20 years, Jacob served his uncle, Laban. Although Laban gave Jacob safe haven and eventually two of his daughters in marriage, he dealt duplicitously with Jacob, changing his wages and their agreements multiple times whenever Jacob seemed to be getting ahead (Genesis 31: 41 in Bible).

As they finally parted, Jacob remonstrated to his father-in-law, ‘Except the God of my father … had been with me, surely thou hadst sent me away now empty’ (Genesis 31: 42 in the Bible). Instead, God being with him, Jacob returned home transformed from a penniless refugee to the husband and father of a large family. He had a goodly number of servants and was abundantly blessed with the wealth of the time. (see Genesis 32 in the Bible).

Joseph the son of Jacob is the classic example of one who consistently prevailed in adversity by trusting in God when others might have felt abandoned by Him. First, he was sold into slavery by his own brothers. Then, when he rose in position and esteem in the house of his Egyptian master, Potiphar, Joseph was falsely accused by Potiphar’s wife and jailed despite having literally run away from sin. Nevertheless, Joseph continued to trust in God. Even in prison he was prospered but was then forgotten by those he had helped despite their promises. (See Genesis 37: 39-41 in the Bible).  In the end, as we know, Joseph was rewarded with high office and the means to save his father’s family (and all of Egypt) in a time of famine.

When we have our Heavenly Father’s help, our adversity and our afflictions will refine rather than defeat us. We will emerge happier and holier beings. In a revelation the Lord said this about His Apostles: ‘And after their temptations, and much tribulation, behold, I, the Lord, will feel after them, and if they harden not their hearts, and stiffen not their necks against me, they shall be converted, and I will heal them’ (Doctrine and Covenants 112: 13).”  (Quoted part of the article entitled “The Refining Fire of Affliction” by D. Todd Christofferson, March, 2022 in the Liahona Magazine)