Exodus 13:17 MSG

17 It so happened that after Pharaoh released the people, God didn't lead them by the road through the land of the Philistines, which was the shortest route, for God thought, "If the people encounter war, they'll change their minds and go back to Egypt."