2 So the king said to Joab and the commanders of the army, who were with him, "Go through all the tribes of Israel, from Dan to Beer-sheba, and take a census of the people, so that I may know how many there are."

Matthew Henry's Commentary on 2 Samuel 24:2

Commentary on 2 Samuel 24:1-9

(Read 2 Samuel 24:1-9)

For the people's sin David was left to act wrong, and in his chastisement they received punishment. This example throws light upon God's government of the world, and furnishes a useful lesson. The pride of David's heart, was his sin in numbering of the people. He thought thereby to appear the more formidable, trusting in an arm of flesh more than he should have done, and though he had written so much of trusting in God only. God judges not of sin as we do. What appears to us harmless, or, at least, but a small offence, may be a great sin in the eye of God, who discerns the thoughts and intents of the heart. Even ungodly men can discern evil tempers and wrong conduct in believers, of which they themselves often remain unconscious. But God seldom allows those whom he loves the pleasures they sinfully covet.