God's message to David emphasizes the incredible journey he has undergone, transforming from a simple shepherd into the leader of a nation. This reflection on David's past serves as the essential background for the monumental question of building the Temple. Because constructing a house for God is such a profound and significant undertaking, God begins the conversation by reminding David of the immense kindness He has already shown him simply by choosing him [מצודת דוד].
David's story starts in the humble setting of the sheepfolds and pastures [רש״י, מצודת ציון, רד״ק, ביאור שטיינזלץ]. From tending flocks, he was elevated to the highest position, becoming the ruler and king over the Israelites [ביאור שטיינזלץ, צאינה וראינה]. Commentators use this stark contrast between his past and present to explain the timing of the Temple's construction, offering two distinct perspectives.
On one hand, this background reveals why the time has not yet come to build the Temple. David's kingship is not yet fully permanent or firmly established. He was not born into royalty but was taken from behind the sheep. At this stage, his status is that of a ruler who has not yet received the promise of an eternal dynasty that will pass seamlessly from generation to generation [מלבי״ם].
Conversely, a deeper spiritual approach views David's selection as the exact condition necessary for building the Temple right now. According to this perspective, God's presence cannot enter the physical world without a righteous person to serve as a channel. God's holiness first settles within the soul of the righteous individual, and only through him does it extend outward to a physical location, reaching Jerusalem and the Temple. This explains why God never demanded that previous leaders build Him a house; the proper individual to draw down His presence had not yet been chosen. Only now, with David taken from the flocks and established as leader, is the groundwork finally laid for a permanent house. The man through whom God's presence can rest among the Israelites has finally been found [אלשיך].