The first Posuk of this Parsha contains two important pieces of information. First, we are told that Paroh sent Bnai Yisrael out of Egypt. Then, we read that Hashem decided not to lead Bnai Yisrael through the land of the Pelishtim, which would have been the most direct route to Eretz Yisrael, because He realized that the people might be frightened of war with the Pelishtim (שמות י"ג:י"ז). These two points do not seem to be related to each other at all. Why, then, are they found in the same Posuk?
Some suggest that had Bnai Yisrael left Egypt without Paroh's consent, they would have left with a feeling of awe upon seeing Paroh and his mighty army helpless to stop them. Nobody could have had any doubt about Hashem's power to protect them from any enemy and they thus could have gone towards the land of the Pelishtim without any fears. But Hashem willed otherwise. He wanted Paroh to release Bnai Yisrael of his own free will. He therefore struck Paroh with plague after plague until he finally let them go. As a result, Bnai Yisrael might have thought that Hashem's power was enough only to cause plagues, but not enough to destroy an entire army. Therefore, had they gone towards the land of the Pelishtim, they might indeed have panicked upon the thought of war with the Pelishtim. Having determined that Paroh must free Bnai Yisrael of his own free will, Hashem could not lead the people to a place where war would be a possibility.
Of course, Hashem could have taken Bnai Yisrael out of Egypt any way He wanted, and could have dealt with the Pelishtim in a variety of ways. However, Hashem wanted to introduce himself to Bnai Yisrael slowly, so they would be able to gradually realize that everything is under His control. That learning process takes time, and this may be why Hashem did not show all of His powers at once, but rather arranged that Bnai Yisrael should leave Mitzrayim only with Paroh's consent. Once the people fully appreciated Hashem's true greatness, after witnessing the splitting of the Red Sea, they believed both in Him and in Moshe, as the Posuk states (שם י"ד:ל"א). They were then ready to confront any enemy, confident of Hashem's power, as we see at the end of the Parsha, regarding the battle against Amalek (שם ט"ז:ח'-י"ב).