2 Chronicles 7:22
And it shall be answered, Because they forsook the LORD God of their fathers, which brought them forth out of the land of Egypt, and laid hold on other gods, and worshipped them, and served them: therefore hath he brought all this evil upon them.
The answer was given after Solomon assembled all Israel with many nations to dedicate the finished temple with splendor through seven days of dedication. Solomon knelt before the congregation to pray, and as he closed his prayer fire came down from heaven and consumed the burnt-offering and the sacrifices, and the glory of the Lord filled the house so that the priests could not enter. The people bowed with faces to the ground, worshiping and praising Him for His goodness and enduring mercy.
At that dedication Solomon taught that God is not confined to temples like the heathen gods but would meet His people by His Spirit when they assembled in the house dedicated to His worship. His eyes would be open toward the house night and day to hear prayer made toward that place, hallowing it to put His name there forever with His eyes and heart there perpetually.
The promise was conditional: if Solomon and Israel would walk as David walked in integrity of heart and uprightness and keep all that God commanded with His statutes and judgments, with Solomon remaining faithful and the people obeying all His commandments, the glorious temple would stand forever in all its splendor. In that case it would be evidence of the prosperity and exalted blessings resting on Israel for obedience and a lasting sign of God's favor, and God would establish the throne of the kingdom upon Israel forever. Forsaking the Lord God of their fathers who brought them out of Egypt means turning from following Him, not keeping His commandments and statutes, committing wicked acts, and instead clinging to other gods and going to serve them and worship them. This abandonment of the God of their ancestors who brought them out of Egypt for other gods is what brings the calamity.
The evil therefore brought upon them is being cut off out of the land given them, having the house hallowed for His name cast out of His sight, suffering them to go into captivity to humble and punish them, and becoming a proverb and a by-word among all people. The ruined temple and land would thus witness why judgment came, with the dedicated temple becoming a proverb and byword among the nations rather than a lasting sign of favor. That warning was fulfilled some hundreds of years after the temple was built in the destruction of the temple, when God brought the threatened calamity because Israel transgressed His commandments. By that time the temple had become the pride of Israel, which they regarded with idolatry while sinning against God.
Before its destruction, just before the end, God made its fate and the captivity known to a few faithful and righteous servants. Those men with mourning and sadness removed the sacred ark containing the tables of stone and secreted it in a cave to be hid from Israel because of their sins and never restored to them. It still remains undisturbed where it was hid.