Unless the Lord builds the house, its builders labor in vain (Psalm 127:1).
Imagine spending years building an expensive home with the finest materials and craftsmanship. It is a work of art. The project is almost complete. The day arrives to move in. A building inspector arrives just before you are to move in. He hands you a notice. That notice condemns your beautiful home because it doesn't meet code.
Many Christian business people invest years in their businesses who will one day stand before the Lord and realize THEY were building the house, not the LORD. God is very picky about motives behind the actions. Before we act we must ask WHY? Why are we doing what we are doing? Has God called us to this task? Or is the real motive purely financial? Or control. Or prestige. If any man builds on this foundation using gold, silver, costly stones, wood, hay or straw, his work will be shown for what it is, because the day will bring it to light. It will be revealed with fire, and the fire will test the quality of each man's work (1Corinthians 3:12,13).
David learned this principle by the end of his life. Throughout his life he learned that God always tested David to find out what was in his heart. And what his motive was in his actions. He instructed his son to acknowledge the God of your father, and serve Him with a whole hearted devotion and with a willing mind, for the Lord searches every heart and understands every motive behind the thoughts"(1Chronicles 28:9).