[based on Rav Shimon Schwab’s sefer, Ma’ayan Beis Ha’Shoeva]
In Shmos 11:8 Moshe tells Paraoh what will happen during the final plague of Makat Bechorot. After Moshe finishes, the Torah tells us that he left Paraoh with great anger:
וְיָרְדוּ כָל-עֲבָדֶיךָ אֵלֶּה אֵלַי וְהִשְׁתַּחֲווּ לִי לֵאמֹר צֵא אַתָּה וְכָל הָעָם אֲשֶׁר בְּרַגְלֶיךָ וְאַחֲרֵי-כֵן אֵצֵא; וַיֵּצֵא מֵעִם פַּרְעֹה בָּחֳרִי אָף
Rashi elucidates that Moshe was angry because of what Paraoh had said in the previous chapter (10:29), when Paraoh told Moshe never to see him again.
Rav Schwab zt”l asks, how it could be that Moshe, the most humble man to ever live would be upset by these words of Paraoh? Furthermore, Moshe agrees that he will never see Paraoh again, and Rashi says in the next passuk (10:30) that Paraoh was correct! So why did Moshe get so angry? What was the purpose – why here, why now?
Rav Schwab explains that Moshe wasn’t getting angry because of something Paraoh did to Moshe; when Rashi says that the anger was because of Paraoh telling Moshe to never see him again, Rashi is saying that those words were an indication of something else (to be explained below)…
Moshe stormed out of Paraoh’s palace angered by one thing: Paraoh’s utter and public disrespect of Hashem. Unquestionably, Moshe must have been frustrated from the first moment Paraoh refused to acknowledge the overt existence of Hashem. But Moshe had a mission; Moshe had a certain shlichus from Hashem from which he never veered. Specifically, in Va’era6:13, Hashem tells Moshe and Aharon to command Paraoh to let Bnei Yisrael leave Egypt:
וַיְדַבֵּר ה’ אֶל מֹשֶׁה וְאֶל אַהֲרֹן וַיְצַוֵּם אֶל בְּנֵי יִשְׂרָאֵל וְאֶל פַּרְעֹה מֶלֶךְ מִצְרָיִם לְהוֹצִיא אֶת בְּנֵי יִשְׂרָאֵל מֵאֶרֶץ מִצְרָיִם
Rashi quoting Medrash Tanchuma, on the words “Paraoh melech Mitzrayim,” says that Moshe and Aharon were instructed to give kavod/respect to Paraoh. Therefore, Moshe was bound by Hashem’s word to keep his anger to himself during his mission of interacting with Paraoh. Until the moment that Moshe knew he would never again see Paraoh’s face, Moshe treated him like a king, despite watching Paraoh disrespect The King of Kings, over and over again. However, once Paraoh told Moshe he would never see him again, and Moshe knew Paraoh was correct, Moshe realized that his shlichus was over. He was no longer required to give Paraoh respect, because he had completed the mission Hashem gave him. At that point, Moshe shows Paraoh how angry he was at the constant chilul Hashem perpetrated by Paraoh. Paraoh’s words were an indication to Moshe that his mission was complete, and now Moshe could display his anger out of kavod to Hashem and for the purposes of protecting Hashem’s great Name.
We see that there is a time and a place for different emotions and actions. Hashem needed Moshe and Aharon to give respect to this king for a period of time; they had to give Paraoh a chance to recognize Hashem and they couldn’t let their emotions get the better of them. When the time came, however, to display some zealotry, Moshe showed how infuriated he was to watch Paraoh desecrate Hashem’s Name.
Additionally, we see the importance of remaining true to the mission you were appointed to accomplish, and avoiding allowing ego to cloud that mission. Furthermore, I think there is additional proof for Rav Schwab’s idea about the thoroughness of Moshe’s shlichus, found in another Rashi in Va’era (6:27):
הֵם הַמְדַבְּרִים אֶל פַּרְעֹה מֶלֶךְ מִצְרַיִם לְהוֹצִיא אֶת בְּנֵי יִשְׂרָאֵל מִמִּצְרָיִם הוּא מֹשֶׁה וְאַהֲרֹן
On the last part of the passuk, Rashi implicitly wonders why we need to hear again that the passuk is talking about Moshe and Aharon – who else would it be talking about? Rashi explains, that Moshe and Aharon were the same people – complete in their shlichus and in their tzidkus - from beginning to end. To quote Rashi:
הוא משה ואהרן: הם בשליחותם ובצדקתם מתחלה ועד סוף
As noted, Moshe and Aharon never waivered from the first time they approached Paraoh until the last time they saw his face before Makat Bechorot. They are the model for leaders, stripped of all ego, and followers of Hashem’s word to the fullest extent possible.