After a long list of Levites and all their duties they would have in the soon-to-be-built Temple, there’s another list of military commanders. There’s 12 altogether, each in command of a 24,000-strong division that served for a month.
Then , there’s a footnote to David’s failed census, incited as it was by Satan. Coming directly after the lists of commanders and their divisions, it shows us that there was no need for the census at all:
1 Chronicles 27:23-24 When David took his census, he did not count those who were younger than twenty years of age, because the Lord had promised to make the Israelites as numerous as the stars in heaven. Joab son of Zeruiah began the census but never finished it because the anger of God fell on Israel. The total number was never recorded in King David’s official records.
There are many theories about why David started that census, but this makes it clear that military necessity wasn’t it.
It also shows us that the census was never finished. David’s conscience struck before a got a final number, leading him to repent and offer sacrifices as the situation required.