Parashat Masei
These are the journeys of the children of Israel. The Lord said to Moses, "Write down the journeys that the Israelites have taken in the wilderness, so that they may know how many miracles I performed for them in each journey." It is similar to a king whose son fell ill, so he took him to another place for his healing. When they returned, the father began to mention the journeys, saying, "Here we slept, here we were honored, here you had a headache." Similarly, the Lord said to Moses, "Count for them all the places [where they angered Me]." This is why it is said, "These are the journeys of the children of Israel." It is written (Isaiah 63:11), "Then His people remembered the days of old, of Moses: Where is He who brought them up out of the sea with the shepherd of His flock? Where is He who put His Holy Spirit within them?" Just as one does not bring the flock into the cool shade, so too, the Israelites did not enter the cool shade for forty years.
Another explanation: Just as sheep do not gather treasures, only the shepherd in the wilderness, so too, Israel lived for forty years without gathering treasures.
Another explanation: Just as in a place where the shepherd leads, the flock follows, so too, Israel would travel to any place that Moses and Aaron guided them. And Moses wrote (hinting with the numerical value 318): "And they journeyed from Raamses in the first month." It is written, "He made the moon for festivals; the sun knows its setting." Rabbi Yochanan said, "The sun was created only to illuminate during the day." It is written, "Let there be lights in the firmament." But if so, why was the moon created? To sanctify the beginnings of months and years. Rabbi Shila of Kfar Tamarta said in the name of Rabbi Yochanan, "Even though the sun knows its setting, we learn from here that we do not count the moon unless the sun has set." Yusta Haverya said in the name of Rabbi Berachya, "And they journeyed from Raamses in the first month, on the fifteenth day of the month." If you count the moon until that point, there are only fourteen (heard or measured). From here we learn that we do not count the moon unless the sun has set.
"And they journeyed from Raamses." The Lord said to Israel, "When you were in Egypt, you were scattered for a period of forty days. I brought you together for a brief moment in Raamses, and now you are scattered in all the lands. I will gather you again, as it is said, 'And it shall come to pass on that day, the Lord will extend His hand a second time.'"
"On the morrow of the Passover, the children of Israel went out." It is written, "The Lord your God brought you out of Egypt at night." But did they not go out at night? Was it not during the day? Rather, it teaches us that the redemption began for them in the evening, as it is said, "And this day shall be a memorial for you." It is a day that is a memorial for you, but we did not hear which day it is. When it says, "And Moses said to the people, 'Remember...'," it is still unclear. But when it says, "On the morrow of the Passover, on the fifteenth day of the festival," and they did not go out until the festival day itself, it becomes clear.