Another interpretation: Why did He say to them the miracle of the serpent? It is because Pharaoh was likened to a serpent, as it is stated: “[Thus says the Lord God: Behold, I am against you, Pharaoh, king of Egypt,] the great serpent that lies in the midst of his rivers” (Ezekiel 29:3). When Moses would exit from Pharaoh, [Pharaoh] would say: If the son of Amram will come to me, I will behead him, I will hang him, I will burn him. When Moses would enter, immediately, Pharaoh became a staff.5Like a dry piece of wood, he did nothing.
Pharaoh the Serpent Confronted by Aaron's Rod
Shemot Rabbah 9:4