“You shall take the Levites for Me, I am the Lord, in place of every firstborn among the children of Israel, and the animals of the Levites in place of all the firstborn among the animals of the children of Israel (Numbers 3:41). “You shall take the Levites for Me” – they should be taken in My name. “I am the Lord” – I am trustworthy to pay a good reward to those who are taken in My Name. “In place of every firstborn among the children of Israel” – because the firstborn are Mine, as it is stated: “For all the firstborn [among the children of Israel] are Mine…on the day that I smote all the firstborn in the land of Egypt…” (Numbers 8:17).
The Holy One blessed be He said: Due to fondness of Israel, I altered the world order. How did I write in the Torah? It was that a donkey is redeemed with a lamb, as it is stated: “The first issue of a donkey you shall redeem with a lamb” (Exodus 34:20). I did not do so, but rather, I redeemed a lamb with a donkey: the Egyptians, who were called a donkey, as it is stated: “That their flesh is the flesh of donkeys” (Ezekiel 23:20), and Israel is called a lamb, as it is stated: “Israel is scattered sheep” (Jeremiah 50:17).
I killed their firstborn, and I sanctified the firstborn of Israel, as it is stated: “For all the firstborn among the children of Israel are Mine…on the day that I smote all the firstborn [in the land of Egypt]” (Numbers 8:17). “And the animals of the Levites in place of all the firstborn among the animals of the children of Israel” – as you find that the Omnipresent killed the firstborn of Egypt’s animals and spared Israel’s animals.
That is why He sanctified the firstborn of Israel’s animals. Likewise it says: “For all the firstborn [among the children of Israel] are Mine…on the day that I smote all the firstborn [in the land of Egypt].”