Exodus 29:46
And they shall know that I am the LORD their God, that brought them forth out of the land of Egypt, that I may dwell among them: I am the LORD their God. And they shall know that I am the LORD their God, that brought them forth out of the land of Egypt, that I may dwell among them: I am the LORD their God.
The promise was given through Moses while Israel was encamped before Mount Sinai, that He would dwell among the children of Israel as their God. He brought them out of the land of Egypt for the purpose of dwelling among them and being their God, and they would know Him as the LORD their God who brought them out in order to dwell among them. His presence among them expressed His covenant relationship with them.
Throughout the wilderness wandering the promise was fulfilled with great goodness, mercy, loving-kindness, salvation, redemption, and personal care. In all their affliction He was afflicted, and the Angel of His presence saved them and bore them. Though they repeatedly rebelled and vexed His Holy Spirit, in mercy He stretches out His hand to save and restore and renews the covenant that His Spirit shall remain among them. The promise was renewed to Israel as they cooperated with His purpose, with the assurance that His Spirit would remain among them.
Haggai recalled it to comfort the temple builders, that God's Spirit remains among them and they need not fear. To His children today as in days of old the promise gives assurance of His presence and incentive to be strong and work faithfully.