The following is a snippet from Wikipedia.
5 Whys is an iterative interrogative technique used to explore the cause-and-effect relationships underlying a particular problem. The primary goal of the technique is to determine the root cause of a defect or problem by repeating the question “Why?” Each question forms the basis of the next question. The “5” in the name derives from an empirical observation on the number of iterations typically required to resolve the problem.
The technique was formally developed by Sakichi Toyoda and was used within the Toyota Motor Corporation during the evolution of its manufacturing methodologies. In other companies, it appears in other forms. Under Ricardo Semler, Semco practices “three whys” and broadens the practice to cover goal setting and decision making.
Not all problems have a single root cause. If one wishes to uncover multiple root causes, the method must be repeated asking a different sequence of questions each time.
The method provides no hard and fast rules about what lines of questions to explore, or how long to continue the search for additional root causes. Thus, even when the method is closely followed, the outcome still depends upon the knowledge and persistence of the people involved.
The answer to the last why has to be a process and not a person. A key phrase to keep in mind in any 5 Why exercise is “people do not fail, processes do”.