These verses are most likely written by Mormon. They serve as the moral to the story. Even in the terrible circumstances, an important lesson could be learned. It is a lesson that Mormon emphasizes in other stories as well: “thus we can plainly discern, that after a people have been once enlightened by the Spirit of God, and have had great knowledge of things pertaining to righteousness, and then have fallen away into sin and transgression, they become more hardened, and thus their state becomes worse than though they had never known these things.”
For Mormon, the most dangerous enemies were not the Lamanites, but rather the apostate Nephites.
There is no chapter break at this point in the 1830 edition of the Book of Mormon. The next chapter begins with Ammon speaking in the aftermath of this terrible slaughter.