Every citizen in israel shall dwell in sukkot, so that your descendants shall know that in sukkot I caused the Children of Israel to dwell when I brought them out of the land of Egypt (Leviticus 23:42,43).

When Israel left Egypt, they left with a wealth of possessions - with the spoils that they had taken from the Egyptians and with the wealth which they had recovered from the sea.

They came to the wilderness and found no vegetation, no water, and no dwelling place. What pleasure could they derive from all their possessions? G‑d said to them:

"Take your silver and gold, and all your other precious objects, and store them away. You shall eat bread provided from Heaven and drink water from the rock. Your clothing will not wear out, nor your shoes upon your feet. All of your sustenance shall be from Me. And if you say, 'What use is our great wealth to us?' [I say:] 'Give it for the work of the Mishkan'...and I shall consider it as if you had sustained Me with your wealth."

When Israel arrived at their "place of rest and inheritance" [i.e., the Land of Israel], after they had toiled in the fields and vineyards and their Land had yielded its produce, upon gathering their bounty they would leave their houses and dwell in temporary booths.

So that your descendants shall know that in sukkos I caused the Children of Israel to dwell - the bounty which had been gathered was not merely the fruit of the land, for the blessing of G‑d is that which brings wealth. [G‑d says:] Just as I have given you blessing, so too shall you, My children, bless Me with what I have given you. And you shall celebrate it as a Festival to G‑d for seven days a year (ibid. 23:39).

Now, in the case of the Festival of Passover, the verse does not state seven days a year, but rather seven days, whereas, when referring to the Festival of Sukkot, the Torah states: seven days a year.

The difference in expression comes to teach us that these seven days of rejoicing before G‑d through the performance of His commandments and dwelling in the sukkah are regarded as if Israel had rejoiced before G‑d all year. All of their work during the entire year is considered to have been only for the sake of G‑d's glory.