Parshas Vaera begins with a reprimand to Moshe Rabbeinu. Rashi, citing the Talmud (Sanhedrin 111A), understands the beginning of the parsha as a response to the harsh words that Moshe utilizes against Hashem, "My Lord, why have You done evil to this people? From the time I have come to Pharaoh things have only become worse, and You did not rescue Your people" (Shemos 5:22-23.) The Talmud relates that Hashem bemoans Moshe's lack of faith in contrast with that of the Patriarchs. Hashem promised each of the avos the land of Israel, yet when Avraham needed a burial plot for Sarah, and had to pay an extraordinary amount of money, he did not challenge Hashem. Similarly, Hashem told Yitzchak to stay in the land, and He will bless him, yet the basic necessity of water did not come without contention and strife, and Yitzchak does not complain. Finally, at the majestic dream of angels ascending the ladder, Hashem gives the land to Yaakov, yet years later, when Yaakov returns home, he has to purchase Shechem for one hundred ksitah, without a word of protest. In contrast, Moshe expresses sharply his disappointment in Hashem and his frustration - had only Moshe learned from his illustrious predecessors.
At first glance, the charge against Moshe seems unwarranted and unfair. The avos were willing to accept without question situations that affected them personally. They demonstrated outstanding faith and did not question the ways of Hashem. Moshe, on the other hand, was not questioning regarding anything personal, but rather on behalf of his people. This is consistent with his earlier behavior that the Torah lauds. We are told (Shemos 2:11), that Moshe grew up and went out to help share the load of his people. At the burning bush, when we are told (Shemos 3:4) that Hashem saw that Moshe turned aside to see, the Midrash notes that this refers not simply Moshe's turning here to see the bush, but also his turning aside to see the hardships of his people. Why then is there room for disappointment and reprimand for what appears to be altruistic and praiseworthy behavior of Moshe?
An answer may be based on an important teaching of the Chafetz Chaim zt"l. The wise sage said, "Mir meg yaah zagin az iz bitter, mir tur nit zagin az iz schlecht - one is permitted to say under certain conditions, hardships and tribulations that it is bitter, but one cannot say it is bad." One should understand and appreciate bitterness like medicine. At times medicine has a bitter taste, but one realizes that ultimately it is for their benefit. Trials of ill health, lack of livelihood, and not-yet finding a shiduch can be most difficult, but our faith in G-d helps us to bear the burden as He too is affected and is involved in our crisis. The Talmud (Sanhedrin 46A) teaches that in the event of an execution by the sanhedrin of 23 judges Hashem bemoans the circumstance and says, "I have pain in My head, pain in My arms." The mishna comments that if this is true regarding a sinner, how much more so is He pained by the suffering of the righteous.
This point is a great source of consolation. His involvement, as stated in the passuk, (Tehillim 91:15), "Emo Anochi b'tzarah - I am with him in his time of suffering", is most comforting. As Rabbi Akiva teaches, "Whatever Hashem does is for the best" (Berachos 60B.) We often cannot understand how a particular medication works, but we trust that it is for the benefit of the patient; so is the case with bitterness administered by The Doctor.
Moshe is taken to task for his use of the word "ha-rei-osa - You have done bad." In fact, the oppressive servitude that prompts Moshe to cry out, unbeknownst to him, is what hastened the hour of redemption. The Gaon of Vilna notes that the verse (Shemos 1:14), "V'ymorreru es chayeihem - and they (the Egyptians) embittered their lives" is sung to the joyous tune of kadma-v'azla, whose gematria (numerical character) is one hundred and ninety, alluding to the one hundred and ninety years of servitude that was reduced from their sentence of four hundred years.
The Midrash (Shemos Rabbah 23:3) comments that Moshe challenged Hashem with the word "az" - "me'az bosi el Paroh - from the time of my coming to Pharaoh", and he also began his song of deliverance with the word "az" - "az yashir Moshe - then Moshe and the children of Israel sang." The Beis Halevi famously explains this Medrash to mean that by beginning the song with the word az Moshe was acknowledging that the bitterness was for Bnai Yosroel's ultimate benefit and was also thanking Hashem not only for the miraculous deliverance, but for the entire bitter process as well.
Finally, the Semag sees a biblical reference to the teaching of Rabbi Akiva, that all of His actions are for the good, from the verse, "v'yoda'ato im l'vovecha ki ka'asher ye'ya'ser ish es beno Hashem Elokecha meyasreka - and you shall know in your heart that just as a father will chastise his son, so Hashem, Your G-d, chastises you" (Devorim 8:5.) We may now understand the reprimand to Moshe at the beginning of the parsha, where Hashem tells him, "Ani Hashem", since this name of G-d represents His attribute of mercy, and what appeared to Moshe to be bad for the people was really a loving gesture to shorten their path to redemption.