Sometimes, slavery can become comfortable especially after you have spent many years in it.
You have adapted so well after many years of unproductive fight for freedom. Though you are daily subjected to inhuman treatment from your slave master, although you have to source for the raw materials and present the processed products to your taskmaster daily, though your skin is baked by the scorching sun daily, at least you have a thatched roof over your head, water to wash your face and some legumes to remind you of what your slave master sumptuously feeds on daily. So, you become hopelessly comfortable in your grief.
When God decides to deliver you from that slavery, he may not take you through the closest route to your destination. Why? You may see wars and decide to return to slavery. He will rather take you through the wilderness of the Red Sea so you can build faith and stamina for war little by little. Exodus 13:17-18. Because away from the slavery of Egypt are wars that you must fight before receiving your promised land.
God knows the human frame. Although you have seen mighty miracles in the land of Egypt – things that eyes have never seen nor ears heard, you as human tend to forget about past victories and focus on present challenges easily. You have short memories. You are focused on what you can see and feel at that moment, instead of what the Lord can do. You are scared of present danger instead of reminding yourself of past triumphs.
This is why faith is not feeling. Faith is knowledge. Faith is experience. Faith is remembering what God has done before and believing what he is doing and about to do. Faith is the substance (tangible evidence, concrete knowledge) of things hoped for. The evidence (from past victories) of things that are not yet seen (of new victories even if the challenges are different and more complex).
So, God wanted Israel to experience small wars, other victories, and minor challenges before meeting the Philistines. This way, they would build faith to face the giants. They needed more time to build faith.
Don’t become comfortable with your slavery. Don’t desire to return to the past because of little wars. Don’t be in a haste to get into Canaan. Allow God to take you through the wilderness. Build faith. Build stamina. And trust God because He knows what he is doing.