Why would we ever rejoice or exult in our tribulations? That seems absurd from every human angle. But that's what Paul says in Romans 5:1-5:
1Therefore, since we have been justified by faith, we have peace with God through our Lord Jesus Christ. 2Through him we have also obtained access by faith into this grace in which we stand, and we rejoice in hope of the glory of God. 3More than that, we rejoice in our sufferings, knowing that suffering produces endurance, 4and endurance produces character, and character produces hope, 5and hope does not put us to shame, because God's love has been poured into our hearts through the Holy Spirit who has been given to us. (ESV)
It is obvious to rejoice in the fact that we as believers have access to God's grace and continue to stand in His grace. As Schreiner puts it, "Those who scorned God's glory (Rom 1:21-23) and have fallen short of it (3:23) are now promised a future share in it." This hope (ejlpivV) isn't a desire that something might happen—biblical hope is a sure confidence, a steadfast confidence in the promises of God. And in this case, it is the sure confidence that we will not be punished by the wrath of God because we have peace with Him, and that someday we will have the glory that Adam forfeited restored to us.
But why rejoice in our sufferings? Again, Schreiner says, "This is an astonishing statement since future glorification is prized precisely because afflictions are left behind." And since Schreiner understands this so much better than I, and since he says this so much more eloquently than I ever could, here is Schreiner's explanation of Rom 5:3-4:
"…The logical chain in the argument leads to the conclusion that afflictions end up producing hope. The reason that believers exult in afflictions, then, is that they conspire to produce greater hope. But how can afflictions beget hope? The chain of reasoning in verses 3-4 provides the answer.
"First, afflictions produce endurance. Those who undergo troubles are toughened up, so that they are able to withstand the storms of life. We have our first clue as to how troubles can spawn hope, since Paul often connects endurance with eschatological hope. Second, endurance produces tested character (dokimehvn). The word dokimhv is not found prior to Paul, but it is clearly related to dokivmion (testing, James 1:3; 1 Peter 1:7). Elsewhere the term involves the validation or proof of one's character (2 Cor 2:9; 8:2; 9:13; Phil 2:22). After one endures many difficulties, a strength of character develops that was not present previously. Such tested character in turn generates hope. Why does tested character spark hope? Because moral transformation constitutes evidence that one has really been changed by God. Thus it assures believers that the hope of future glory is not an illusion. There is a pattern of growth in the here and now, however imperfect, that indicates that we are changing. Believers, then, become assured that the process that God has begun He will complete.
"…The parallel with Romans 8:28-39 is crucial here. Those who are justified will assuredly be glorified; nothing will separate believers from the love of Christ… [But] this assurance, as Romans 6 will show, is no ground for moral laxity."
I know that's a huge quote, but it really encouraged my heart, and I hope it encourages you as well!