1 Chronicles records one story of David doing something that God didn’t want him to do. This story explains how David came to choose the place where the temple would be built.
David had all the fighting men in Israel counted. This was considered an evil deed. It isn’t fully understood why this was wrong. Perhaps the way that David counted the men went against the instructions recorded in Exodus 30:12–16.
Later David recognised that he had sinned. He repented. God took away David’s guilt but still brought judgement against him for what he had done. All of Israel suffered when God punished David.
The plague stopped when David built an altar and made sacrifices to honour God. He did this at the threshing floor of a Jebusite man. God heard David’s prayers and accepted his offering. God made this clear by sending fire from heaven to the altar. After that, David decided that the temple and its altar would be built there.
David was completely committed to having a temple built for God. He understood that God didn’t want him to be the one to build it. David made all the plans that were needed so that Solomon could build it. This included appointing workers and gathering all the wood, stone and metals. David explained all the plans to Solomon. He also explained to Solomon the covenant God had made with David’s family line.
David urged Solomon to be completely committed to the Mount Sinai covenant. He also urged him to start building the temple. He wanted Solomon to keep working on the temple until it was finished.