The Torah tells of the Jews desperation and anguish when hope seemed lost:
וּפַרְעֹה הִקְרִיב וַיִּשְׂאוּ בְנֵי יִשְׂרָאֵל אֶת עֵינֵיהֶם וְהִנֵּה מִצְרַיִם נֹסֵעַ אַחֲרֵיהֶם וַיִּירְאוּ מְאֹד וַיִּצְעֲקוּ בְנֵי יִשְׂרָאֵל אֶל הֹ – Pharaoh drew near, and the children of Israel lifted up their eyes, and behold! the Egyptians were advancing after them. They were very frightened, and the children of Israel cried out to the Lord. (14:10)
Rashi remarks that תפשו אומנות אבותם – They seized the craft of their ancestors.
The seems to praise the Jews. But why identify it as something their ancestors would have done? At the beginning of the slavery we find that they cry out and the ancestral heritage is not mentioned: וַיְהִי בַיָּמִים הָרַבִּים הָהֵם, וַיָּמָת מֶלֶךְ מִצְרַיִם, וַיֵּאָנְחוּ בְנֵי-יִשְׂרָאֵל מִן-הָעֲבֹדָה, וַיִּזְעָקוּ; וַתַּעַל שַׁוְעָתָם אֶל-הָאֱלֹהִים, מִן-הָעֲבֹדָה – Now it came to pass in those many days that the king of Egypt died, and the children of Israel sighed from the labor, and they cried out, and their cry ascended to God from the labor.
Rashi does not explain that their cry was prayer – it obviously was – the tradition of prayer that dates back to the Patriarchs.
Perhaps it isn’t a praise at all. An insight into the people praying: וַיֹּאמְרוּ אֶל מֹשֶׁה הַמִבְּלִי אֵין קְבָרִים בְּמִצְרַיִם לְקַחְתָּנוּ לָמוּת בַּמִּדְבָּר מַה זֹּאת עָשִׂיתָ לָּנוּ לְהוֹצִיאָנוּ מִמִּצְרָיִם. הֲלֹא זֶה הַדָּבָר אֲשֶׁר דִּבַּרְנוּ אֵלֶיךָ בְמִצְרַיִם לֵאמֹר חֲדַל מִמֶּנּוּ וְנַעַבְדָה אֶת מִצְרָיִם כִּי טוֹב לָנוּ עֲבֹד אֶת מִצְרַיִם מִמֻּתֵנוּ בַּמִּדְבָּר – They said to Moses, “Were there no graves in Egypt that you have taken us to die in the desert? What have you done to us by taking us out of Egypt?! Isn’t this what we told you in Egypt, saying, ‘Leave us alone, and we will serve the Egyptians, because we would rather serve the Egyptians than die in the desert?!’”. (14:11-12)
These people are clearly not the most righteous people; they go from prayer to wishing themselves back into slavery and rejecting G-d and Moshe in a heartbeat.
That is the point Rashi illustrates here. They did not pray because it was the right thing to do; they prayed because it was what their fathers would have done. תפשו אומנות אבותם – They seized the craft of their ancestors – not עבודה – service, but craftsmanship; it was work!
R’ Yitzchok Hutner queries that morning prayers before Az Yashir detail how Hashem listened to our cries. But these cries were hardly noble, so why are mention this in our prayers?
He answers with a parable, about a king who is friends with a nobleman, whose son is close to the prince. One day, whilst visiting the prince in the palace, the nobleman’s son bursts into the king’s chamber and starts shouting at the workers, and the king tells them to do as he says.
It’s not because of what the nobleman’s son said or deserved: it’s because his father is the king’s friend.
This is why we mention Zchus Avos in the opening paragraph of Shemona Esrei; in spite of our lack of merit, our lineage should stand us in good stead.