"'They did not ask, "Where is the Lord, who brought us up out of Egypt and led us through the barren wilderness, through a land of deserts and rifts, a land of drought and darkness, a land where no one travels and no one lives?"'" NIV translation
When times were tough and they had to go through struggles, the people clung to God and followed Him wholeheartedly. As time went by and it was forgotten (and not taught to the children) the people felt as if they did not need God. Then, when the tough times came again, they turned to any and all idols to help them.
Many of us do the same things today as we have forgotten how God has delivered us out of our sin. This leads us to trust in our own efforts, our bank accounts, or other things and we get further and further away from God. During the smooth times, we need to remember how God has delivered us from the rough times. This will prepare us for the trials and troubles that are to come. A big part of remembering is sharing your testimony with others.