In 2 Samuel 24:1 we are told that: “Again the anger of the Lord was aroused against Israel, and He moved David against them to say, ‘Go, number Israel and Judah.’” Because this chapter goes on to say that God punished David when he did take a census of Israel’s fighting men, the biblical account is difficult to understand at this point. Another odd aspect about the story is that it appears to differ in an important detail in the parallel account in 1 Chronicles which tells us: “Now Satan stood up against Israel, and moved David to number Israel” (1 Chronicles 21:1).
So who moved David to count the Israelite men – and if it was God, why was David punished for this? There are several aspects involved in clarifying this situation. First, as at least one commentary points out, it is possible that the first sentence of 2 Samuel 24:1 –“And again the anger of the Lord was kindled against Israel” – is actually the title for the section of text that follows, so that the following “He” in “He moved David” in this verse might be understood as Satan, as in 1 Chronicles 21.
Notice that when David was challenged regarding taking the census by his military commander, Joab, David did not claim that God had instructed him to do this, but nevertheless “the king’s word prevailed” (2 Samuel 24:3-4). Further, we see that as soon as the census was taken, David regretted what he had done: “David was conscience-stricken after he had counted the fighting men, and he said to the Lord, “I have sinned greatly in what I have done. Now, Lord, I beg you, take away the guilt of your servant. I have done a very foolish thing’” (vs. 10). If God had instructed David to take the census, David’s words at this point would not make any sense.
So one solution to the apparent problem is to see Satan as being behind rousing David to conduct the census in both accounts. But at a deeper level we can also understand that in some ways God can be said to influence individuals by creating the circumstances in which He knows the individual is likely to act. In this way Exodus tells us that Pharaoh’s heart was hardened toward Israel (Exodus 8:19) when God created circumstances in which this might happen. In this sense 2 Samuel 24:1 may mean that God allowed Satan to tempt David because, as the verse stresses, His anger “was aroused against Israel” for its sinfulness at that time. Note that it was primarily Israel that was punished, not David; but it is as if God decided to punish Israel at a time and in a way that would teach David an important lesson regarding his own failings.
It seems that David’s sin in numbering Israel was due to his underlying motive for carrying out the census. God actually instructed Moses to number the Israelite fighting men for a specific reason on two occasions (Numbers 1:1-3; 26:2-4). But, as the Wycliffe Bible Commentary points out, there were only two logical reasons for taking a census in David’s time: to tax the population or (more likely because it was the fighting men who were counted) to prepare to conscript an army. Because God had blessed David with both physical abundance and safety, the taking of a census may have demonstrated a failure on David's part through pride in his military strength or, conversely, lack of trust in not looking to God for economic or military help that might be needed.