In I Chronicles 22:7-10, King David relates to his son and future successor, Solomon, that God did not allow David to build the Temple because David had shed a lot of blood and waged great wars. Solomon, however, a man of rest who would preside over a time of peace for Israel, would build the Temple.
Why would David waging wars disqualify him from building the Temple? Did not God command or sanction David’s warfare, as a way to defeat Israel’s enemies and bring Israel to a state of peace?
The Orthodox Jewish Artscroll commentary lists a variety of reasons that David’s warfare disqualified him from building the Temple, as it draws from commentators. One commentator stated that David killed innocent people, both in his military campaigns and also apart from those (as when David had Uriah killed so that David could take Uriah’s wife, Bathsheba). Another commentator said that David’s warfare demonstrated that David was a man of strict justice, perhaps because David was punishing foreign enemies for their sins, whereas the Temple was to be a place of forgiveness and mercy. In essence, the Temple was to be a place of rest and peace. Exodus 20:22 forbids an iron instrument from being used to manufacture the stones of the altar, and a traditional Jewish interpretation is that this is because iron instruments related to warfare, and the altar was to be disassociated from warfare. David may have fulfilled God’s role for him in conducting wars—-and even here some question whether David’s conduct of the war accorded perfectly with God’s will, since David killed innocent people. Still, God was bringing forth a new era of peace, in which the Temple would play a significant role, and God wanted a man of peace to be the one who would build that Temple.
Even though God turned David down when David wanted to build the Temple, however, David still found ways that he could contribute so as to make things easier for his successor. The nineteenth century preacher Charles Haddon Spurgeon had a good sermon about this, and how we should find things that we can do for God.