14 And thus there became a great inequality in all the land, insomuch that the church began to be broken up; yea, insomuch that in the *thirtieth year the church was broken up in all the land save it were among a few of the Lamanites who were converted unto the true faith; and they would not depart from it, for they were firm, and steadfast, and immovable, willing with all diligence to keep the commandments of the Lord.
15 Now the cause of this iniquity of the people was this—Satan had great power, unto the stirring up of the people to do all manner of iniquity, and to the puffing them up with pride, tempting them to seek for power, and authority, and riches, and the vain things of the world.
16 And thus Satan did lead away the hearts of the people to do all manner of iniquity; therefore they had enjoyed peace but a few years.
17 And thus, in the commencement of the thirtieth year—the people having been delivered up for the space of a long time to be carried about by the temptations of the devil whithersoever he desired to carry them, and to do whatsoever iniquity he desired they should—and thus in the commencement of this, the thirtieth year, they were in a state of awful wickedness.
(Book of Mormon 3 Nephi 6:14 - 17)
As the people became affluent, they wanted more riches. Some people can never have enough. I can see it in the lives of people around me. They work hard, they make a lot of money, and they only want more. They forget the poor and the less fortunate. Satan whispers into their ears they like to be wealthy, and they start listening to him. Soon he tells them to ignore others, and focus only on making themselves happy. Listening to him, is a slippery slope that is hard to overcome.
When we give away a portion of our agency to the adversary, it becomes more difficult to make right choices. He is subtle and patient, but we can see here, that in only a few years, he was able to get a hold of the hearts of many good people, and caused them to commit all sorts of iniquity.
If Christ is always first and foremost in our lives, we will not go astray, whether we have great wealth, or are in abject poverty. He is the rock, that we need to build on.