This seems clear enough doesn't it? God makes David begin a census.
And again the anger of the LORD was kindled against Israel, and he moved
David against them to say, Go, number Israel and Judah.
For the king said
to Joab the captain of the host, which was with him, Go now through
all the tribes of Israel, from Dan even to Beer-sheba, and number ye
the people, that I may know the number of the people.
Oh but that's a sin though and it's Davids sin.
And 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:
and now, I beseech thee, O LORD, take away the iniquity of thy servant;
for I have done very foolishly.
Fortunately God has a way to make things right
again. David must choose one of three punishments.
2Sa 24:11-15 For when David was
up in the morning, the word of the LORD came unto the prophet Gad, David's
Go and say unto David, Thus saith the LORD, I offer thee three things;
choose thee one of them, that I may do it unto thee.
So Gad came to David, and told him, and said unto him, Shall seven years
of famine come unto thee in thy land? or wilt thou flee three months
before thine enemies, while they pursue thee? or that there be three
days' pestilence in thy land? now advise, and see what answer I shall
return to him that sent me.
And David said unto Gad, I am in a great strait: let us fall now into
the hand of the LORD; for his mercies are great: and let me not fall
into the hand of man.
So the LORD sent a pestilence upon Israel from the morning even to the
time appointed: and there died of the people from Dan even to Beer-sheba
seventy thousand men.
So because God made David conduct a census it was necessary to murder
70,000 people who had no say in the matter.