Question: Why was it a sin for David to number the people of Israel (2 Samuel 24) (1 Chronicles 21)?
Answer: God did not direct David to number the people, in fact, it was done without consulting God. It was brought about by a temptation from Satan (2 Samuel 24: 1, margin) (1 Chronicles 21: 1) which David did not resist sufficiently. Even Joab, David’s commander-in-chief, protested unsuccessfully against such numbering, as he apparently saw that David’s intentions were wrong.
The numbering evidently came from David’s fleshly desires, although the Scriptures do not state the form. The sin may have been a desire to set up a military organization that was in some way inconsistent with the Theocratic constitution of Israel. He may have wanted to know the number of his subjects, especially those “that drew sword” (1 Chronicles 21: 5), for the sake of appraising his military power. It may be that instead of trusting sufficiently in God and His mighty power, David sought rather the strength and glory of his kingdom in the number of the people and their readiness for war.
We read that “David’s heart smote him after that he had numbered the people. And David said unto the LORD, I have sinned greatly in that I have done” (2 Samuel 24: 10). He asked God’s forgiveness, which was granted, but a severe punishment came upon the people (v. 15). David graciously requested of God (v. 17) that the punishment should not come upon the people, but upon his family. Finally, the plague was stayed.