Exodus 13:17
Exodus 13:17 AMP
So it happened, when Pharaoh let the people go, God did not lead them by way of the land of the Philistines, even though it was nearer; for God said, “The people might change their minds when they see war [that is, that there will be war], and return to Egypt.”