The Torah relates to us the wonderful and miraculous events that occured in our forefathers’ exit from Egypt; the ten plagues, the drowning of the Egyptian army in the Sea of Reeds, and others. When the Children of Israel saw the Egyptian army laying dead on the shores of the sea, they sang “shirah”. The entire song they sang is written for all generations in the Torah (Exodus 15:1). The “shirah”, or song begins with the word “az”, or “then” (“Then Moshe and the Children of Israel sang”). Interestingly enough in Exodus (5:23) when Moshe makes his first appearance before Pharaoh and receives his first refusal he returns to G-d with a complaint. “Why did you send me?” “From when (“az”) I came to Pharaoh to speak in Your name, he has only made it worse for this nation” In Moshe’s complaint he uses the same word “az”. The midrash states that Moshe said “I sinned to G-d (by complaining) with the word “az”, so I’ll begin the “shirah” with the same word.” The question is how does that help?
Rabbi Chaim Soleveitchik in his work “Bais HaLevi” writes an interesting and revealing explanation. Usually when a person thanks G-d for getting him out of a tough situation, he thanks Him for the rescue, and that he now finds himself in a better situation. In this particular person’s thank you there will be no thanks for the suffering he found himself in before, needless to say, but just for the rescue. However the nature of the song of thanks which the Children of Israel sang was somewhat different. They sang for the suffering as well. Why? The reason is a follows. When G-d rescued the Children of Israel from the slavery in Egypt His existence and greatness was publicized throughout the civilized world. The suffering in Egypt was purposeful. The Children of Israel merited to be the vehicle through which G-d’s name was exalted and sanctified. This was their main happiness, at that time. See for yourself in the verses of the song.
Earlier, when Moshe complained with the word “az”, He was complaining about the severity of the enslavement. Now when he sings praise to G-d, he uses the same word to give thanks even for the very same enslavement!