Exodus 13:17-22 "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: But God led the people about, through the way of the wilderness of the Red sea: and the children of Israel went up harnessed out of the land of Egypt. And Moses took the bones of Joseph with him: for he had straitly sworn the children of Israel, saying, God will surely visit you; and ye shall carry up my bones away hence with you. And they took their journey from Succoth, and encamped in Etham, in the edge of the wilderness. And the LORD went before them by day in a pillar of a cloud, to lead them the way; and by night in a pillar of fire, to give them light; to go by day and night: He took not away the pillar of the cloud by day, nor the pillar of fire by night, from before the people."
God always leads us in the path that is best for us. It may not always be the most direct path. However, it will be the path where we can learn the most about Him. It will be a path where we can grow in out trust and confidence in Him.
God knew that the Philistines were a warring people. War was not something that the Israelites had ever engaged in up to that point as far as the scripture records. God was not going to lead the Israelites into a situation that would tempt them to return to Egypt. God will never lead His people in the way of temptation (James 1:13-14).
Instead, God led them through the way of wilderness. He directed them on a path where they would be solely leaning on Him. He directed them toward the Red Sea where He would show them again that He alone was the LORD of the Hebrews. They were formed into ranks (harnessed) as though they were able bodied soldiers, which was something God would enable them to be.
God went before them on this journey as a pillar of could by day and a pillar of fire by night. The LORD was very visible to the children of Israel. We would be tempted to think that God was painting a target on them by such a display. This just shows again that God is able to comfort us with His presence, and by that same presence confound our enemies.
Beloved, God lead His people then, and He leads His people now. He makes His presence obvious to us in our journey. He makes a path where there is none. And He always leads us in the way that is best for us. Rely on Him!