Have you ever taken a short cut to shave off a few minutes and got lost? Then trying to find your way back took double the time. Many times we get in a hurry and sometimes that is when we get lost. A great example of this in the Bible is when the Israelites were delivered from Pharoah and God parted the Red Sea. They were heading for the Promised Land and got stuck in the wilderness for forty years.
This time in the wilderness prepared them for the battles to come when they would fight for the Promise Land. God can use all things for good. So even when we are stubborn and miss the mark he has mercy on us and uses the situation to strengthen us in Him.
Remember how the LORD your God led you all the way in the wilderness these forty years, to humble and test you in order to know what was in your heart, whether or not you would keep his commands. Deuteronomy 8:2