Deuteronomy 8:2; 9:7 "You shall remember all the way which the LORD your God has led you in the wilderness these forty years, that He might humble you, testing you, to know what was in your heart, whether you would keep His commandments or not." "Remember, do not forget how you provoked the LORD your God to wrath in the wilderness; from the day that you left the land of Egypt until you arrived at this place, you have been rebellious against the LORD."
The living God never gives an unneeded command. The apple of His eye, His covenant people were prone to forget... forget the purposes He had for the wilderness wandering, forget their disobedience and lack of faith that prompted His wrathful discipline. In truth, the various observances, with their procedures and components (such as the elements in the Passover meal), were tools for remembrance, for the teaching of each succeeding generation.
There is spiritual application here... as we know that a sure sign of sonship is the Father's discipline (Hebrews 12:5,6), it is inevitable that we who have been born again will have "wilderness" times. Grievous though they are (v. 7), they are meant to (1) serve as proof that we are His, (2) provide a testing of our heart, and (3) produce the peaceful fruit of righteousness.
During such times, we may lose the sense of His nearness... feel that our praying is unheard... come to wonder if, indeed, we are believers, after all. What is so needed everyday becomes utterly critical in the times of His discipline: perspective. He is moving us from walking by sight to walking by faith... He is widening our willingness to suffer and thank Him at the same time... in short, He is conforming us more and more into the image of His suffering Servant, the Lord Jesus Christ.