When you made a decision, even if the original problem/need wasn't fixed or solution is not optimal, you are less likely to make another decision because you just made it one before.

You can get to the bus stop with two routes a left one (400 steps) and a right one (500 steps). You take the right one and make 40 steps. Then you remind yourself about the left route. Even though at this point the left one is still closer (440 vs 460) you are more likely to keep going on the right route because you already started going this direction.

Related: Sunk-cost fallacy