The temple was a magnificent structure, and when Solomon dedicated it to the Lord, he prayed that God would hear the prayer of anyone – Israelite or alien – who would come there to pray.
When all was finished however, God made an appearance to Solomon, and emphasized what was important: “if you walk before me as David your father did, and do all I command, and observe my decrees and laws, I will establish your royal throne, as I covenanted with David your father when I said, ‘You shall never fail to have a man to rule over Israel.’ But if you turn away and forsake the decrees and commands I have given you and go off to serve other gods and worship them, then I will uproot Israel from my land, which I have given them, and will reject this temple I have consecrated for my Name. I will make it a byword and an object of ridicule among all peoples. And though this temple is now so imposing, all who pass by will be appalled and say, ‘Why has the Lord done such a thing to this land and to this temple?’ People will answer, ‘Because they have forsaken the Lord, the God of their fathers, who brought them out of Egypt, and have embraced other gods, worshiping and serving them—that is why he brought all this disaster on them.’ ” (2 Chronicles 7:17ff).
Trust, which of necessity requires allegiance and obedience, is what God has always wanted. His blessings have always been dependent on it, and nothing has changed or displaced that very important point.
This passage was a reminder, that their recent experience as exiles was that they had failed to keep the covenant of the Lord. It was also a warning for the future.