[A2A] Because He was putting on a show, to demonstrate to the Hebrews* and other nations that He is the greatest—nay, the only—God.
This was, if you like, God’s comeback performance (His first since the Flood), so he was intent on making a big impression. And what greater impression could there be than to beat up and humiliate the most powerful kingdom in the known world at that time?
He says as much to Moses before it all begins (Exodus 3:19–20 ):
יט וַאֲנִי יָדַעְתִּי–כִּי לֹא-יִתֵּן אֶתְכֶם מֶלֶךְ מִצְרַיִם, לַהֲלֹךְ: וְלֹא, בְּיָד חֲזָקָה.
כ וְשָׁלַחְתִּי אֶת-יָדִי, וְהִכֵּיתִי אֶת-מִצְרַיִם, בְּכֹל נִפְלְאֹתַי, אֲשֶׁר אֶעֱשֶׂה בְּקִרְבּוֹ; וְאַחֲרֵי-כֵן, יְשַׁלַּח אֶתְכֶם
19 And I know that the king of Egypt will not let you go, no, not by a mighty hand.
20 And I will stretch out my hand, and smite Egypt with all my wonders which I will do in the midst thereof: and after that he will let you go.
*Hebrews (or Israelites)—not Jews. Jews (or rather, Judeans) come centuries later.