Reenacting their history through things like the Celebration of Booths was the people's way of remembering that God will save them now and in the future just as He’s saved them in the past. They were saying that they wanted to be directed by the Word of God, not tradition. And because of their obedience to God’s Word, there was gladness.
Obedience to the Word of God creates gladness in His people, which in turn prompts more attention to studying, rejoicing in, and obeying His Word.
If we fail to remember properly, we will drift away from what we need to know. (Hebrews 2:1: “Therefore we must pay much closer attention to what we have heard, lest we drift away from it.”)