באר מים חיים, Exodus Exodus · ח
Be'er Mayim Chaim 11
ט
And the Lord did according to Moses' word; the frogs died away, from the houses, from the courtyards, and from the fields: Meaning, that since the Holy One, blessed be He, desired to fulfill the word of His servant and the faithful prophet to His [people], Moses, they therefore died in this order, first from the houses, afterward from the courtyards, and afterward from the fields. For Pharaoh's request was like this, since he said, that He may remove the frogs from me, and from my people (Exodus 8:4), meaning first from me and afterward from my people, that the removal be in order of the closest first. And likewise did Moses promise him and say, the frogs shall depart from you and your servants [and your people], etc. (Exodus 8:7). And hence in order to fulfill Moses' word, He did so: the frogs died away, from the houses, from the courtyards, etc.. This would not have been so had the Holy One, blessed be He, brought them back to the Nile. It would not have been in this order. For the closer ones would return to the Nile first, and those are the ones from the fields, and afterwards the ones from the houses. And even though Moses said to Pharaoh, only in the Nile shall they remain, its understanding is not that they would return to the Nile, but rather that they would all die. And the only ones that would remain are the ones that had stayed in the Nile, like the statement of the sages, may their memory be blessed (Shemot Rabbah 10:5). And the Holy One, blessed be He, did it to sanctify His great and holy name — that nothing should be missing from that which Moses said, and they would trust the Lord and Moses His servant (alluding to Exodus 14:31).