This is part of David’s prayer of gratitude to God. Having offered Him a house (the Temple), David is overwhelmed by the Lord’s declaration that He will build David a house. (a dynasty) In humility, David recognizes that it’s the Sovereign Lord Who has been present with him all along and will continue to be with him. He is also humbled by God’s unmerited favor…for God has chosen David and the Nation of Israel itself to be His chosen people through whom God’s great Name will become known to the world. (Exodus 15:11-13 & Deuteronomy 7:6-8)