The saints were experiencing a lot of persecution when the Prophet Joseph Smith received Sections 97-101.
The first open violence against the members in Jackson County occurred on July 20, 1833, when the printing press owned by William W. Phelps was destroyed. In addition, many of the members were turned out of their homes, and Edward Partridge and Charles Allen were tarred and feathered on the public square in Independence, Mo.The Prophet was unaware of these problems when he received Sections 97 and 98. In the first three verses of Section 98, the Lord called on the saints to "rejoice evermore, and in everything give thanks" (vs. 1) and reminded them that "all things wherewith you have been afflicted shall work together for your good" (vs. 3).
"This was a call to show forth tremendous faith in God," states the Doctrine and Covenants student manual. "It is a relatively simple thing to pour out gratitude to God when the cup is full, the harvest plenteous, the peace secure; but it is much more challenging to have the faith to believe that even in adversity and persecution, even in times of darkness and devastation, the Lord's hand is in it for the benefit of his children. The promise that all things work for the good of the righteous is repeated in several other places."
President Harold B. Lee talked of adversity in a 1973 area conference in Munich, Germany. "Some of us have been tried and have been tested until our very heart strings would seem to break. I have heard of persons dying with a broken heart, and I thought that was just a sort of poetic expression, but I learned that it could be a very real experience. I came near to that thing; but when I began to think of my own troubles, I thought of what the apostle Paul said of the Master, `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.' (Heb. 5:8, 9.)
"Don't be afraid of the testing and trials of life. Sometimes when you are going through the most severe tests, you will be nearer to God than you have any idea, for like the experience of the Master Himself in the temptation on the mount, in the Garden of Gethsemane, and on the cross at Calvary, the scriptures record, `And, behold, angels came and ministered unto him.` (Matt. 4:11.) Sometimes that may happen to you in the midst of your trials."
In a letter to the saints in Missouri, the Prophet wrote that he did not understand fully the reasons behind the persecution. However, Section 101 offers some answers, writes Sidney B. Sperry in Doctrine and Covenants Compendium.
"In the opening lines, the Lord makes clear that He has allowed the brethren in Missouri to be afflicted, persecuted, and cast out from their inheritance in consequences of their transgression. But in spite of that fact, He says that He will own them and make them His in the day when He comes to make up His jewels.
"The Almighty also explains that His people need to be chastened and tried (vss. 6-9), even as Abraham was tried in being commanded to offer up his only son (Gen. 22:1-2). Those who cannot endure chastening and who deny the Lord cannot be sanctified or made holy."