Joab was correct that David sinned when he took the census of Israel’s fighting men (1 Chron. 21:1–6). We learn that in today’s passage, which begins by telling us that “God was displeased” with the census (v. 7). David recognized his sin, asking for pardon (v. 8).
The Lord indeed forgave David, but not before imposing discipline. Using the prophet Gad as His mouthpiece, God offered David a choice between Israel’s suffering famine, foreign invasion, or pestilence (vv. 9–12). It may seem strange that Israel would suffer for David’s sin, but remember the unique relationship between the king and the people. Israel’s king held a representative role, and his actions as Israel’s leader could not help but affect the common people. Jesus, the greatest Son of David, later took on this representative role when He came to earth as the federal head, or representative, of His people (Rom. 1:1–6; 5:12–21). Of course, Jesus’ actions led only to good for His people, unlike those of the other Davidic kings.
David threw himself on the mercy of God, indicating a return to his trusting in the Lord (1 Chron. 21:13). And, while the Lord’s pestilence killed seventy thousand men, God did show mercy, relenting from destroying Jerusalem as well (vv. 14–15). Seeing the angel of the Lord at the threshing floor of Ornan the Jebusite, David threw himself on God’s mercy once more, this time leading the elders in repentance (vv. 16–17). Second Samuel 24 describes this as well, though the author there uses the alternative spelling Araunah for Ornan.
Because David had sinned, atonement was required. The angel told David to build an altar on Ornan’s threshing floor. So, David obeyed God’s instructions through the angel, buying the site and making offerings to the Lord. God answered the sacrifices by having the angel sheath his sword, demonstrating that the pestilence was over (vv. 18–27). The Lord’s acceptance of the sacrifice proved that it was a suitable place of worship, so David declared that the permanent temple would be built there (21:28–22:1).
From our new covenant perspective, we see not only that these events identified the place for the temple but that they point us to Christ. Like David, Christ purposed to build a temple and offered a sacrifice to assuage the wrath of God. But Jesus’ work is superior, for unlike David, Jesus had no sin of His own, actually builds the temple, and by His death on the cross assuages the wrath of God against His people forever (Rom. 3:21–26; 2 Cor. 5:21; 1 Peter 2:4–5).