The Sages observe that, each time the Torah describes Moshe Rabbenu getting angry, he is also depicted as erring in his conduct or making a mistake in his application of halakha. The final instance of this is provided in Parashat Mattot, wherein Moshe Rabbenu becomes aggravated when he discovers that the Jewish soldiers missed the point of the military campaign against Midian and, as a result, took far too many captives. After castigating them for this oversight, Moshe provides them with a few procedural details they were expected to observe vis a vis ritual purity and departs. Elazar, the Kohen Gadol, then instructs them as to the proper method of "purging" Midianite vessels for Jewish (i.e., kosher) use. The Rabbis state that Moshe himself should have informed the soldiers of these laws; however, because he lost his temper, he forgot to do so.
Working backwards from a chronological standpoint, the second - and probably most famous - case of Moshe getting angry is when he became frustrated, struck a rock and thereby forfeited the privilege of entering the Land of Israel. The connection between loss of temper and mistake in both of these examples is clear. In the first, Moshe's anger distracted him from the need to convey important halakhic information to the soldiers. In the second situation, the fact that Moshe became flustered led him to overreact and behave impulsively, thus transgressing the commandment of Hashem.
However, there is another instance of Moshe's anger that does not fit this mold and that is, as a result, quite intriguing. In Parashat Shemini, after the sudden deaths of Nadav and Avihu, Moshe commands Aharon, Elazar and Itamar - the remaining Kohanim - to proceed with the sacrificial services as planned. However, it subsequently becomes clear that, rather than consuming one of the sin offerings - precisely which one is a subject of debate in Masekhet Zevahim, and would take us too far afield of the topic at hand - that offering was burnt. Moshe becomes angry and takes the Kohanim to task for this error. Aharon, his brother, responds to the harsh criticism and deflects the stated objections to their course of action; in the end, Moshe himself acquiesces that the Kohanim made the correct decision after all. The Rabbis point to this situation as another example of how anger can cause a wise man to make errors in halakha - Moshe became angry and, lo and behold, his halakhic analysis was proven wrong!
There is an obvious problem, however, with this observation of our rabbis; namely, in this instance, the error most definitely preceded the anger, and not the other way around. After all, it was because of Moshe Rabbenu's incorrect belief that the sin offering should be consumed that he became angry in the first place! One cannot possibly conclude that falling victim to the emotion of anger was what caused Moshe to make a mistake here; in fact, the very opposite is true. Moshe's halakhic opinion - subsequently shown to be erroneous - inspired him with the righteous indignation that he then proceeded to vent on his brother and his nephews.
(Incidentally, it is worth mentioning that, in some versions of the Midrash - for this very reason - this example is NOT cited to illustrate the principle that anger breeds intellectual error. However, the present analysis will be based on the version of the Midrash cited by Rashi, which does include the sin offering case.)
The resolution of this difficulty can be derived from a careful reading of Rashi's comments on the incident in Parashat Mattot:
Because Moshe came into the category of anger (ba likhlal kaas) he came into the category of error (ba likhlal ta-ut), such that he forgot to mention the laws of purifying vessels obtained from non-Jews. So too do we find on the eighth day of the dedication of the Mishkan, where Moshe got angry with Elazar and Itamar - he came into the category of anger (ba likhlal kaas) so he came into the category of error (ba likhlal ta-ut). Similarly, when Moshe said "hear now rebels" and struck the rock, because of anger he erred (al yedei hakaas ta-ah).
What is the meaning of the cumbersome expression "came into the category of anger" and "came into the category of error". Why not simply state that Moshe got angry, so he made a mistake! Indeed, in the last case, Rashi employs different phraseology, writing simply "because of anger he erred". If the first, more lengthy expression is more accurate, then why did Rashi see fit to change it after already using it twice?
I believe that Rashi is conveying a profound insight with his nuanced use of language. We tend to assume that the main reason that anger is harmful is because the emotional state of rage itself interferes with rational thought and prevents us from deliberating properly. This is certainly true, but there is another connection between anger and error that is less obvious at first. Anger and error both emerge from the same root cause - interpreting reality from a subjective rather than objective vantage point.
Rashi's statement that "one who comes into the category of anger comes into the category of error" means that the same orientation toward an event that has the potential to lead to anger also has the potential to lead to error, even if anger has not yet occurred. When are personally invested in a project or event, we approach it in an very emotionally sensitive manner. This means we are likely to become angry if things do not proceed according to plan. It also means that we are prone to making mistakes in our analysis of the situation that we would not have made had we been operating more objectively.
Consider the difference in how a bride approaches the planning of her wedding and the orientation of a professional caterer to the same phenomenon. The former is likely to become extraordinarily upset if her "big day" does not meet with the highly specific expectations she has established. Precisely because of this sensitivity, she is also prone to erring in her interpretation of and/or reaction to any deviations from her vision, real or imagined.
A caterer, on the other hand, is emotionally detached from the specific wedding she is managing. She surveys the circumstances from a business standpoint, and understands the steps that need to be taken to create an elegant and meaningful event for any given client. If an error is made, she may be disappointed, but she is unlikely to become enraged. Similarly, she has the intellectual objectivity to assess and resolve apparent crises effectively without committing substantial errors.
On the day of the dedication of the Mishkan, Moshe Rabbenu should have been like a caterer faithfully and objectively executing his mission. Instead, he became like a bride, personally invested in the process and therefore highly sensitive regarding any deviation from the prescribed procedures. The dedication represented the culmination of Moshe Rabbenu's spiritual stewardship of the Jewish people up to that point, and it had to be perfect. It was tragic enough that two of the sons of Aharon perished, marring the joyousness of the event. Everything else, as far as Moshe Rabbenu was concerned, had to be in strict compliance with the specific vision he had in mind.
The subjective orientation he had to the consecration of the Mishkan led him to think rigidly about the mitsvot involved, to become attached to a highly particular way that things "had to be" and, in the end, to get angry with the sons of Aharon when they deviated from the plan he envisioned. What he failed to realize was that, because he had become so personally involved in the situation, he had unwittingly erred in his analysis of the relevant halakhot.
The same circumstance obtained with regard to the war with Midian. Here again, the situation at hand was of enormous personal significance to Moshe Rabbenu. It was his final act of leadership of the Jewish people, the sealing of his legacy for all generations. Ideally, Moshe should have liberated himself from this highly subjective framework of thought and considered matters from a purely objective standpoint. He may still have reprimanded the soldiers upon their return, but without losing his temper.
Instead, he allowed his personal investment in the battle to color his perception of the war, and he became angry when it did not meet with the expectations he had formed. His loss of an objective perspective also manifested itself in the fact that he did not fully address all of the halakhic issues that were relevant in the aftermath of the battle. He focused on maintaining the sanctity of the camp and the Miqdash - areas of the highest priority for him as religious leader - but neglected matters of practical import for the soldiers themselves, such as how to purify the vessels they had captured from Midian for kosher use.
The exception to this pattern was the case of striking the rock, in which Moshe Rabbenu, because of his personal frustration with the Jewish people and their recalcitrance, misinterpreted their complaints as rebellious in nature and became angry. This anger led him to deviate - not in thought, but in action - from the command of Hashem. The emotion of rage overwhelmed him and influenced his behavior. In the words of Rashi, in this circumstance, "al yedei kaas, ta-ah" - because of anger, he erred.
We see then how, with only a few carefully chosen words, Rashi explains to us the complex relationship between anger and error. Sometimes, it is a simple matter of cause and effect. The passionate state of rage that overtakes us impairs our judgment and we behave inappropriately, as Moshe did in the case of the rock.
However, there are times when anger and intellectual errors can emerge simultaneously from a more fundamental source - our subjective investment in the outcome of a certain process or event. In these cases, both phenomena are ultimately traceable to the mental framework through which we have chosen to perceive a given situation. Thus, oftentimes anger and intellectual carelessness appear together because they share a common origin, and not necessarily because one is the direct cause of the other. A person prone to getting angry about something is equally prone to make mistakes about it.