And behold, the city had been rebuilt, and Moroni had stationed an army by the borders of the city, and they had cast up dirt round about to shield them from the arrows and the stones of the Lamanites; for behold, they fought with stones and with arrows.Alma 49:2
Why did the city have to be rebuilt? Well, remember back in chapter 16, when the Lamanites destroyed it?
For behold, the armies of the Lamanites had come in upon the wilderness side, into the borders of the land, even into the city of Ammonihah, and began to slay the people and destroy the city.Alma 16:2
Since then, it had been rebuilt. But since there had only been 5 years at the least, they couldn’t fix all of it so soon.
Behold, I said that the city of Ammonihah had been rebuilt. I say unto you, yea, that it was in part rebuilt; and because the Lamanites had destroyed it once because of the iniquity of the people, they supposed that it would again become an easy prey for them.Alma 49:3
In that verse, it mentions whey the Lamanites targeted Ammonihah: because they had already destroyed it once, so they thought it would still be easy to destroy. But they were disappointed because last time it was destroyed, the people were being wicked and God was not with them. Now that they have God on their side again, they can, with his help, fortify the city more.
The one thing that doesn’t make sense is this verse:
Nevertheless, after many days their dead bodies were heaped up upon the face of the earth, and they were covered with a shallow covering. And now so great was the scent thereof that the people did not go in to possess the land of Ammonihah for many years. And it was called Desolation of Nehors; for they were of the profession of Nehor, who were slain; and their lands remained desolate.Alma 16:11
5 years is not very many years! Well, the date on chapter 16 is a pretty broad range.
About 81–77 B.C.Alma 16
So, it probably was closer to 21 years. Enough years for it to stop stinking, but not enough for them to build it all up again.
And the Lamanites did not come again to war against the Nephites until the fourteenth year of the reign of the judges over the people of Nephi. And thus for three years did the people of Nephi have continual peace in all the land.Alma 16:12
This verse tells us that the Nehors were destroyed in the 11th year.
And now it came to pass in the eleventh month of the nineteenth year, on the tenth day of the month, the armies of the Lamanites were seen approaching towards the land of Ammonihah.Alma 49:1
And this verse tells us that this chapter took place in the 19th year. But 8 years isn’t very long! Even if the Nehors were destroyed at the beginning of the 11th year, almost-9-years isn’t very long either. Maybe the bodies stopped stinking earlier. Maybe Mormon was wrong with a date or two. Maybe “a long time” is relative. We don’t know.