Now when the king lived in his house and the LORD had given him rest from all his surrounding enemies, the king said to Nathan the prophet, “See now, I dwell in a house of cedar, but the ark of God dwells in a tent.” And Nathan said to the king, “Go, do all that is in your heart, for the LORD is with you.”
2 Samuel 7:1-3
King David asked God to let him build a temple. God responded by saying "Look Dave, there is no place big enough to hold me." (This is a loose translation.) Here's what He actually said:
But that same night the word of the LORD came to Nathan, “Go and tell my servant David, ‘Thus says the LORD: Would you build me a house to dwell in? I have not lived in a house since the day I brought up the people of Israel from Egypt to this day, but I have been moving about in a tent for my dwelling. In all places where I have moved with all the people of Israel, did I speak a word with any of the judges of Israel, whom I commanded to shepherd my people Israel, saying, “Why have you not built me a house of cedar?”’ Now, therefore, thus you shall say to my servant David, ‘Thus says the LORD of hosts, I took you from the pasture, from following the sheep, that you should be prince over my people Israel. And I have been with you wherever you went and have cut off all your enemies from before you. And I will make for you a great name, like the name of the great ones of the earth. And I will appoint a place for my people Israel and will plant them, so that they may dwell in their own place and be disturbed no more. And violent men shall afflict them no more, as formerly, from the time that I appointed judges over my people Israel. And I will give you rest from all your enemies. Moreover, the LORD declares to you that the LORD will make you a house. When your days are fulfilled and you lie down with your fathers, I will raise up your offspring after you, who shall come from your body, and I will establish his kingdom. He shall build a house for my name, and I will establish the throne of his kingdom forever.
2 Samuel 7:4-13
God knew that the temple would be David's way of honoring Him. So He allowed David's son Solomon to build the temple. He didn't NEED a temple but, eventually, He would allow it to be built. What God knew then (that David could not even begin to comprehend) was that men will turn a building into an idol pretty quick. The zeal to build a dwelling place for God (as ridiculous as that sounds) is pretty common to mankind. And pretty much ever since King Solomon's temple, men have been building churches, temples, mosques, cathedrals and family life centers. Some were built with honest intentions. Some others...not so much.
But I think even the most avowed atheist would have a hard time standing in front of one of these massive cathedrals without considering the God they were built for. And, for me, these impressive cathedrals of stone will always lead me to be that much more in awe of my God that is far too big for these human chapels.