A Lesson in Scriptural Literacy: Prescriptive vs. Descriptive Reading
There are two types of scripture reading: descriptive and prescriptive. Prescriptive reading is when we look at the text, and in an effort to apply it to our lives, we ask it to tell us what to do and think about a variety of subjects. This is in contrast to descriptive reading, which is when the text is simply telling you what happened, independent of what the human author/God intends you to take from it in terms of your actions.
This may be obvious, but not everything that happens in the scriptures is good. We're not intended to copy every single thing that we see happening in them because the scriptures are not a purely prescriptive text. So just because there were petty, judgmental, and racist characters in the Book of Mormon, that doesn't give license to us to be petty, judgmental, and racist in our day. Rather, their inclusion is a descriptive warning about the moral rot these forces caused an entire civilization.
To interpret everything that happens in the scriptures as instantly transferable lessons into absolutely any situation, with no independent thought whatever, is to ignore the endowments of intelligence and common sense God has given to us all.
If I have to explain to anyone that you're not supposed to look at the racism in the Book of Mormon and think "surely THIS is the salient information God intended for me to take from this text and apply to my life," it's because you don't understand critical reading. You're also probably a little bit racist and looking for reasons not to deal with that. And honestly, I don't think there's a worse text to justify that, because d'you remember what happens to all the racists in the Book of Mormon?
They die. Bloodily and meaninglessly.
Which is why, for most lessons in the Book of Mormon, there are prescriptive and descriptive passages that teach the same lessons.
Sermon on the Mount/at Bountiful? Jesus is telling me exactly what he wants me to do.
Prescriptive.
The moral inventory in Alma 5, where I'm supposed to engage with every uncomfortable question about the impact of my actions on others, with no appeals to my good intentions? Clearly prescriptive.