Exodus 13:17-18 (MSG)
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.”  So God led the people on the wilderness road, looping around to the Red Sea. The Israelites left Egypt in military formation.
A trip to the wilderness/desert does not mean “it’s over, you’ve messed up, or God’s mad at you.” It means…God cares about you so much that He will not lead you down a path where failure is imminent. In the wilderness He grows us in our faith and trust, strengthens us spiritually, and gives us experience; all so we CAN successfully fulfill His plan.