“It happened that when Pharaoh sent out the nation...Hashem didn't lead them near the Land of the Pilishtim because it was near. Hashem said that when they see a war they will want to return to Egypt.”(Exodus 13:17)
Rashi asks what was the reason that Hashem didn't want to lead the Benai Yisrael near the land of the Pilishtim? And why would going near there cause the Benei Yisrael to want to return to Egypt where they had been slaves for 210 years? And what does it mean “it was near?” What was it near? and what was the significance of mentioning that?
To understand this we need to look back at a previous parsha, and look at the kal vechomer in Parshas Vaera.
Hashem has instructed Moshe to tell Paraoh that he is planning on taking the Jews out of Egypt. Moshe responds, “I can't speak.” (Exodus 6:30)
Why is Moshe saying that he can't speak? Hashem just told him to do something! Why is making this apparent excuse?
Moshe's point was “I just got back from speaking to the Benai Yisrael, and they (who my message is beneficial for) wouldn't listen to me. Why would Pharaoh (who my message is detrimental for) listen to me?
What Moshe didn't understand was that there was a reason that Hashem wanted these events to take place. He wanted Pharaoh to be warned and he wanted the Mitzriyam to go through all of the Makkos, because it wouldn't be enough for the Jews to simply be taken physically out of Mitzriyam, they needed to have the emotional and mental burdens lifted off of them, and psychologically exit Egypt as well. They needed to see the Mitzriyam humiliated and they needed to feel that they were strong.
Hashem's goal is for the Benai Yisrael to be able to walk on their own two feet and throw off the mentality of two centuries of slavery.
But the process didn't end with the Makkos. As we see in this week's Parsha, when the Benai Yisrael are standing by the Yam Suf, and the Mitzriyam are chasing after them, they still have that fear of the Mitzriyam. Yes everything was going great when Hashem was throwing frogs, lice and hail on them, but now they're out and exposed on the water and they still feel helpless and that Hashem is not really with them.
Perhaps the reason that Hashem didn't want to expose the Benai Yisrael to the Pilishtim, was because they still felt, in however small a way, like they were still slaves to the Mitzriyam. To be presented, right out of Egypt, to another nation that wants to start a war with them, will cause them to run back to Egypt, where, as their rational goes, “It's better to be a slave in Egypt then dead out in the desert.” (Exodus 14:12)
They're still clinging to that idea of slavery, that idea of, even if it's hard work, it's steady, it's stable, and it's predictable. Fear of the unknown.
And that's what Hashem's goal is for them to get to the point where they say, “We trust 100% in Hashem, no matter how unpredictable our lives are.”
So Hashem puts them on the rock, with the Mitzriyam bearing down on them, waiting for someone to take that first move and walk forwards by themselves. And as the Midrash explains, Nachson ben Aminadav did take that first step, the step that finally freed the B”Y from the Mitzriyam.