In an article for Beshalach, 5773, Rabbi Cherki explains that the manna was able to demonstrate the instinctive nature of the Children of Israel to do good if the evil inclination did not interfere.
The description in the Torah of the manna that fell from heaven is puzzling. Why does this appear between the two momentous events of the splitting of the Red Sea on one hand and the giving of the Torah on the other hand? The manna is also given disproportional attention in the Kuzari, both in the way it appears between the revelation of the Exodus from Egypt and the events at Mount Sinai, and in the way the Jewish sage presents the faith to the King of the Kuzars. Out of all the possible miracles, Rabbi Yehuda Halevi chose to make an example of the manna! This is absolutely amazing!
Evidently the manna comes as a response to an internal inconsistency that is related to the giving of the Torah. Since the Torah was forced on the people, could it be that it is not a suitable match for their souls? Because of this dilemma, it was necessary before the revelation of the Torah to test the nation, “to see if they will follow My Torah or not” [Exodus 16:4] – to determine if the Torah was suited to the spontaneous character of the nation.
Moses was told two things before the manna came: (1) “They will gather it every single day” [16:4] – which meant that they were not allowed to leave any manna for the next day; and (2) “on the sixth day… there will be twice as much” [16:5] – that on this day the people would gather a double portion.
Moses announced to the people the first part, which included the prohibition to leave any manna over at the end of the day, but he did not tell them about the second part. Some people violated the prohibition and left some manna over, and “Moses was angry at them” [16:20]. But on the sixth day, when the people were not told in advance that something different was happening, they observed the command! “On the sixth day the people collected a double portion” [16:22], leading to a protest by the heads of the nation, “And all the heads of the community came, and they told Moses” [ibid]. Moses responded, “This is what G-d commanded” [16:23].
Thus, the nation was divided into three separate categories with respect to the advance knowledge about G-d’s commands. (1) Moses, the prophet, who was told by the holy spirit what G-d wanted to do. (2) The nation, which instinctively knew G-d’s will. (3) The intelligent intellectuals, whose natural instinct was dulled, and who therefore reacted to the events in formalistic terms.
We can see from all of this that the nation of Israel objects to the word of G-d only when they have been given an explicit command (as the Tosafot have written, one who has been given a commandment is most strongly enticed by his inclination to violate it). But when the people are left to make their own free choice, they can act naturally, according to the will of G-d. As is often written in the Talmud, “Go out and see how the people behave.”
Thus, when an explicit command was given once again, “Let no man go out from his place on the seventh day” [16:29],”some people from the nation went out to collect the manna” [16:27].