Elder Orson F. Whitney said: “No pain that we suffer, no trial that we experience is wasted. … All that we suffer and all that we endure, especially when we endure it patiently, builds up our characters, purifies our hearts, expands our souls, and makes us more tender and charitable. … It is through sorrow and suffering, toil and tribulation, that we gain the education that we come here to acquire.”
In the midst of problems, it is nearly impossible to see that the coming blessings far outweigh the pain, humiliation, or heartbreak we may be experiencing at the time. “No chastening for the present seemeth to be joyous, but grievous: nevertheless afterward it yieldeth the peaceable fruit of righteousness unto them which are exercised thereby.”13 The Apostle Paul taught, “For our light affliction, which is but for a moment, worketh for us a far more exceeding and eternal weight of glory.
Who shall separate us from the love of Christ? shall tribulation, or distress, or persecution, or famine, or nakedness, or peril, or sword? …
Nay, in all these things we are more than conquerors through him that loved us.”
We don't always know why the Lord allows our challenges, or why He doesn't take them away when we pray sincerely and often. But we can be assured that He is in control and "that all things shall give [us] experience, and shall be for our good."