2 Samuel 24:1

And again the anger of the LORD was kindled against Israel, and he moved David against them to say, Go, number Israel and Judah.

The anger kindled against Israel arose because under David's rule the nation prospered and increased in numbers, and as it grew strong in wealth and greatness it became exalted and proud, forgot the Giver of all its mercies, and was fast losing the peculiar and holy character that separated it from the nations around it. David himself in prosperity did not preserve the humility of character and trust in God that marked his earlier life, but looked upon the accessions to the kingdom with pride and contrasted its prosperous condition with its few numbers and little strength when he ascended the throne, taking glory to himself. His being moved to number Israel and Judah was his gratifying ambitious feelings by yielding to the temptation of the devil, to count the people so that he might compare their former weakness with their prosperous state under his rule.

The numbering was displeasing to God and contrary to His express command and order. It was displeasing because it would lead Israel to rely upon strength of numbers instead of the living God. The work of numbering was not fully completed before David was convicted that he had committed a great sin, saw his error, and humbled himself and confessed his folly in foolishly numbering the people, but his repentance came too late to turn aside the punishment because the word had already gone forth to the prophet to offer him his choice of punishments for his transgression. David still showed confidence in God by choosing to fall into the hands of a merciful God rather than be left to the cruel mercies of wicked men.

Swift destruction followed by pestilence in which seventy thousand were destroyed, while David and the elders of Israel lay in deepest humiliation mourning before the Lord, and as the angel was on his way to destroy Jerusalem and stretched out over it, revealed to David and those with him in warlike garments with a drawn sword, God bade him stay his work of death. David was terribly afraid yet cried out in distress and compassion for Israel, confessed his own sin and wickedness, pled that the sheep had done nothing, begged God to save them, and asked that God's hand be against him and his father's house and not upon the people. God spoke by His prophet and bade him make atonement, David's heart was in the work and his repentance was accepted, and though the threshing-floor of Araunah with cattle and everything needful for sacrifice was freely offered to him, he refused to come before the Lord with an offering that cost him nothing and bought it for full price, where he offered burnt-offerings and peace-offerings which God accepted by sending fire from heaven to consume the sacrifice, and the angel was commanded to put his sword into its sheath and cease his work of destruction.

The census stands as an example of people zealously trying to adjust matters by their own judgment when God has not placed those matters in their hands. It is also an example of selfishness in which people try to count or claim Israel as though God's gift of eternal life belonged only to them, warning against making God's free gift exclusive. The example warns against taking actions that bring on trouble or build separation from the world, for the work instead is to carry the message of warning to people who have not yet heard it.