Part of the ongoing Verse Quick Reference project.
Exo 13:17 And it came to pass, when Pharaoh had let the people go, that God led them not through the way of the land of the Philistines, although that was near; for God said, Lest peradventure the people repent when they see war, and they return to Egypt:
In Exodus 13, God is leading Israel away from Egypt. There is an option for God to lead Israel near the land of the Philistines but God decides this is a bad idea. The people might be drawn into war and then want to return to Egypt. This is a possibility that God hedges against. He picks a different route on occasion of this possibility.