Rambam explains that the ideal character is the 'golden mean' between extremes, but anger is one of the traits where the extreme of avoidance is prescribed — only a very small degree of anger is permitted to convey seriousness when needed.
וכן כל מה שבתורה: כנתינת המעשרות, והלקט, והשכחה, והפאה, והפרט, והעוללות, ודין שמיטה ויובל, והצדקה "די מחסורו" (דברים טו, ח) - זה כולו קרוב מיתרון טוב לבב, עד שנתרחק מקצה הנבלה רחוק גדול ונתקרב לקצה יתרון טוב לבב, עד שיתחזק לנו "לב טוב". ובזאת הבחינה בחן רוב המצוות, תמצאן כולם שהן מלמדות ומרגילות כוחות הנפש. כמו שאסרה הנקימה והנטירה וגאולת הדם, באמרו: "לא תקום ולא תטור" (ויקרא יט, יח). "עזוב תעזוב" (שמות כג, ה). "הקם תקים עמו" (דברים כב, ד) - עד שיחלש כוח הכעס והרוגז. וכן "השב תשיבם" (שם שם, א) - עד שתסור תכונת הכילות. וכן: "מפני שיבה תקום והדרת פני זקן" (ויקרא יט, לב). "כבד את אביך ואת אימך" (שמות כ, יב). "לא תסור מן הדבר אשר יגידו לך" (דברים יז, יא) - עד שתסור תכונת העזות ותגיע תכונת הבושת. ואחר כך הרחיק מן הקצה האחרון, רצוני לומר: רוב הבושת. ואמר: "הוכח תוכיח את עמיתך" (ויקרא יט, יז). "לא תגורו מפני איש" (דברים א, יז) - עד שיסור רוב הבושת גם כן וישאר בדרך האמצעי. וכשיבוא האיש הסכל בלא ספק וישתדל להוסיף על אלו הדברים, כמו: שיאסור המאכל והמשתה, מוסף על מה שנאסר מן המאכלים. או יאסור הזווג יותר על מה שנאסר מן הבעילות. ויתן כל ממונו לעניים או להקדש, מוסף על מה שבתורה על ההקדשות ועל הצדקות, ועל הערכים - יהיה עושה מעשה הרעים והוא לא ידע, ויגיע אל הקצה האחר ויצא מן המצוע לגמרי. ולחכמים בזה הענין דבר, לא שמעתי כלל יותר נפלא ממנו, והוא בגמרא דבני מערבא בפרק התשיעי מנדרים, דבר בגנות המקבלים על עצמם שבועות ונדרים עד שישארו כעין אסורים. אמרו שם בזה הלשון: "אמר רב אידי בשם רבי יצחק: לא דיך במה שאסרה תורה, אלא שאתה אוסר עליך דברים אחרים" וזה הענין שזכרנו בשוה בלא תוספת ובלא חיסרון. ואתה יודע שאדון הראשונים והאחרונים: משה רבנו, ע"ה, כבר אמר אליו השם יתברך: "יען לא האמנתם בי להקדישני לעיני בני ישראל" (במדבר כ, יב). "על אשר מריתם את פי למי מריבה" (שם כד). "על אשר לא קדשתם אותי בתוך בני ישראל" (דברים לב, נא). וחטאו, ע"ה, הוא: שנטה לצד אחד מן הקצוות ממעלת המידות, והיא: הסבלנות. כאשר נטה לצד הרגזנות באמרו: "שמעו נא המורים" (במדבר כ, י), דקדק עליו השם יתברך: שיהיה אדם כמוהו כועס לפני עדת ישראל במקום שאין ראוי בו הכעס. וכיוצא בזה בדין האיש ההוא - חילול השם הוא. מפני שמתנועותיו ומדבריו כולם למדים, והיו מקוים להגיע בהם אל הצלחת העולם הזה והעולם הבא - ואיך יראה בו הכעס, והוא מפעולות הרע, כמו שבארנו, ולא יבוא כי אם מתכונות רעות מתכונות הנפש. אבל אמרו בעניין: "מריתם את פי" - הוא כמו שאבאר, והוא: שלא היה מדבר עם סכלים, ולא עם מי שאין לו מעלה. אבל עם אנשים שהקטנה שבנשיהם היתה כיחזקאל בן בוזי, כמו שזכרו החכמים, וכל מה שיאומר או יעשה יבחנוהו. וכאשר ראוהו שכעס, אמרו: שהוא, ע"ה, ודאי אין לו פחיתות מידה, ולולא שהיה יודע שהשם יתברך כעס עלינו בבקשת המים ושאנחנחו הכעסנוהו, יתברך, לא היה כועס - ואנו לא מצינו שהשם יתברך כעס בדברו אליו בזה הענין, אבל אמר: "קח את המטה והקהל את העדה" וגו' (במדבר כ, ח). והנה יצאנו מכונת השער. אבל התרנו ספק מספקי התורה, שנאמר בו דברים רבים, ונשאל פעמים רבות: "איזה חטא חטא" וראה מה שנאמר בו ומה שאמרנו בו אנחנו - והאמת תעשה דרכה.
Likewise, all that is contained in the Law concerning the giving of tithes, the gleaning of the harvest, the forgotten sheaves, the single grapes, and the small bunches in the vineyards for the poor, the law of the Sabbatical year, and of the Jubilee, the giving of charity according to the wants of the needy one, all these approach the extreme of lavishness to be practised in order that we may depart far from its opposite, stinginess, and thus, nearing the extreme of excessive prodigality, there may become instilled in us the quality of generosity. If you should test most of the commandments from this point of view, you would find that they are all for the discipline and guidance of the faculties of the soul. Thus, the Law forbids revenge, the bearing of a grudge, and blood-revenge by saying, "Thou shalt not avenge nor bear any grudge"; "thou shalt surely unload with him" (the ass of him who hates you); "thou shalt surely help him to lift them up again" (thy brother's ass or ox which has fallen by the way). These commandments are intended to weaken the force of wrath or anger. Likewise, the command, "Thou shalt surely bring them back" (thy brother's ox or lamb which has gone astray), is meant to remove the disposition of avarice. Similarly, "Before the hoary head shalt thou rise up, and honor the face of the old man", "Honor thy father and thy mother" etc., "thou shalt not depart from the sentence which they may tell thee" etc., are intended to do away with boldness, and to produce modesty. Then, in order to keep away from the other extreme, i. e. of excessive bashulness, we are told, "Thou shalt indeed rebuke thy neighbor" etc., "thou shalt not fear him" (the false prophet) etc., so that excessive bashfulness, too, should disappear, in order that we pursue the medium course. Should, however, anyone who would without doubt be foolish if he did so try to enforce these commands with additional rigor, as, for instance, by prohibiting eating and drinking more than does the Law, or by restricting connubial intercourse to a greater degree, or by distributing all of his money among the poor, or using it for sacred purposes more freely than the Law requires, or by spending it entirely upon sacred objects and upon the sanctuary, he would indeed be performing improper acts, and would be unconsciously going to either one or the other extreme, thus forsaking completely the proper mean. In this connection, I have nerver heard a more remarkable saying than that of the Rabbis, found in the Palestinian Talmud, in the ninth chapter of the treatise Nedarim, where they greatly blame those who bind themselves by oaths and vows, in consequence of which they are fettered like prisoners. The exact words they use are, "Said Rabbi Iddai, in the name of Rabbi Isaac, 'Dost thou not think that what the Law prohibits is sufficient for thee that thou must take upon thyself additional prohibitions?'" Thou knowest, also, that God said to our teacher Moses, the master of former and later ages, "Because ye have not confided in me, to sanctity me", "because ye rebelled against my order at the waters of Meribah", "because ye did not sanctify me". All this (God said) although the sin of Moses consisted merely in that he departed from the moral mean of patience to the extreme of wrath in so far as he exclaimed, "Hear now ye rebels" etc., yet for this God found fault with him that such a man as he should show anger in the presence of the entire community of Israel, where wrath is unbecoming. This was a profanation of God's name, because men imitated the words and conduct of Moses, hoping thereby to attain temporal and eternal happiness. How could he, then, allow his wrath free play, since it is a pernicious characteristic, arising, as we have shown, from an evil psychic condition? The divine words, "Ye (Israel) have rebelled against me" are, however, to be explained as follows. Moses was not speaking to ignorant and vicious people, but to an assembly, the most insignificant of whose women, as the sages put it, were on a plane with Ezekiel, the son of Buzi. So, when Moses said or did anything, they subjected his words or actions to the most searching examination. Therefore, when they saw that he waxed wrathful, they said, "He has no moral imperfection, and did he not know that God is angry with us for demanding water, and that we have stirred up the wrath of God, he would not have been angry with us". However, we do not find that when God spoke to Moses about this matter He was angry, but on the contrary, said, "Take the staff ... and give drink to the congregation and their cattle". We have, indeed, digressed from the subject of this chapter, but have, I hope, satisfactorily solved one of the most difficult passages of Scripture concerning which there has been much arguing in the attempt to state exactly what the sin was which Moses committed. Let what others have said be compared with our opinion, and the truth will surely prevail.