The full quote that I recall is that “The army never retreated; they simply turned around and advanced in the opposite direction”. (However, I cannot find this quote online.)
Many software projects try different paths and different solutions for problems encountered and some of the newer development methodologies are built for exactly this type of trial and error process and work much better than the older methodologies in that respect. If there is a problem or something is not quite what is desired, then the ability to switch it at the last minute and redo it is built into the process. With older methodologies one was locked into the solution very early in the process and it was very difficult and expensive to switch after the start. Flexibility is required as is the ability to change direction mid-stream as the business conditions change. Some people believe that Quality Assurance mandates against this type of flexibility (and believes that the advance always has to be in the forward direction), however, as we will see below, that is not the case.
The above quote implies a complete turn around with a complete change of plan and in all aspects of the project. While that may be necessary if the project has been incorrectly designed and created from the beginning; it is also very expensive. A complete reversal of the project implies discarding all that has been done or gained (much like the reversal of the forward motion of the army) and a restart somewhere further back in the process with a loss in time and an expenditure of resources that is now lost.
The Process Improvement aspect of Quality Assurance addresses this concern. The need for flexibility is built right into the process. The understanding that change is inevitable and the ability to not only embrace but facilitate that change is included in the defined processes and made part of them. Furthermore Quality Assurance processes are subject to review on a regular basis in to ensure that they have not become outdated or are currently impeding process.