מדרש אויף במדבר 1:50

וְאַתָּ֡ה הַפְקֵ֣ד אֶת־הַלְוִיִּם֩ עַל־מִשְׁכַּ֨ן הָעֵדֻ֜ת וְעַ֣ל כָּל־כֵּלָיו֮ וְעַ֣ל כָּל־אֲשֶׁר־לוֹ֒ הֵ֜מָּה יִשְׂא֤וּ אֶת־הַמִּשְׁכָּן֙ וְאֶת־כָּל־כֵּלָ֔יו וְהֵ֖ם יְשָׁרְתֻ֑הוּ וְסָבִ֥יב לַמִּשְׁכָּ֖ן יַחֲנֽוּ׃

נאָר דו שטעל די לוִיִים איבער דעם מִשכּן פֿון געזעץ, און איבער אַלע זײַנע כּלים, און איבער אַלץ װאָס געהערט צו אים; זײ זאָלן טראָגן דעם מִשכּן, און אַלע זײַנע כּלים, און זײ זאָלן אים באַדינען; און רונד אַרום דעם מִשכּן זאָלן זײ לאַגערן.

Bamidbar Rabbah

Another matter: “However, the tribe of Levi you shall not count” (Numbers 1:49) – why were they not counted with Israel? It is because the tribe of Levi was the palace guard. This is analogous to a king who had several legions, and he said to his chief of staff: Go count the legions, except for the legion that stands before me. That is why the Holy One blessed be He said to Moses: “However, the tribe of Levi [you shall not count]…among the children of Israel” (Numbers 1:49). Among the children of Israel you shall not count them, but by themselves, count them, as it is not in keeping with the king’s honor that his legion should be counted with the legions. That is why Israel was counted by itself and the tribe of Levi was counted by itself.
From where do you say that it is for that reason that He said it to him? It is because it is written thereafter: “And you, appoint the Levites over the Tabernacle of the Testimony…” (Numbers 1:50). When the Holy One blessed be He said to Moses: “However, the tribe of Levi you shall not count…” (Numbers 1:49), Moses grew afraid and said: Is there perhaps a disqualification in my tribe, due to which the Holy One blessed be He does not wish me to count them? The Holy One blessed be He said to Moses: I said so to you only to exclude them from the decree, so that they will not die with them. That is what is written: “And you shall not take a census of them [ve’et rosham lo tisa] among the children of Israel” (Numbers 1:49). Why? It is because the Levites are Mine: “The Levites shall be Mine” (Numbers 3:12, 45). As, anyone who draws Me near, I draw him near. They drew near to Me, as it is stated: “Moses…said: Whoever is for the Lord, come to me; and all the sons of Levi gathered to him” (Exodus 32:26). They drew Me near, and I draw them near: “The Levites shall be Mine.” Moreover, because they were found to be loyal to Me, as they observed my admonition: “You shall have no other gods…” (Exodus 20:3), therefore, they are worthy to be the trustees of My house. “And you, appoint the Levites [over the Tabernacle of the Testimony…and they shall encamp around the Tabernacle]” – likewise it says: “My eyes are on the faithful of the land; they will dwell with Me.” (Psalms 101:6).
You find that anyone who is put to the test regarding a matter,17And he passes the test. the Holy One blessed be He loves him forever. As, you find regarding Joshua that he was put to the test with Amalek, and he performed there in accordance with the Torah and the mitzva, as it is stated: “Joshua weakened [Amalek and its people by sword]” (Exodus 17:13). The Omnipresent said to him: From your tribe, I will establish one who will exact retribution against Amalek forever: “From Ephraim came those who uprooted Amalek” (Judges 5:14). Saul, who was put to the test but did not properly fulfill his command, but rather: “Saul and the people spared [Agag…and all that was good, and would not utterly destroy them]” (I Samuel 15:9), He caused him to fall back [le’aḥorav], and his kingdom was taken from him: “After you [aḥarekha], Benjamin” (Judges 5:14).
This tribe, too, I put them to the test, and they were found observant, and they gave their lives for sanctification of My name, as it is stated: “Each man, place his sword upon his thigh…[and each slay his brother, each his neighbor, each his relative]. The sons of Levi acted in accordance with the word of Moses…” (Exodus 32:27–28); “Who said of his father, and of his mother: [I did not see him, and his brothers he did not recognize, and his children he did not know, because they observed Your saying, and Your covenant they upheld]” (Deuteronomy 33:9). Here, too, I will draw them near and make them My palace guard, and I entrust My sanctity and the function of My house to them. That is what is written: “And you, appoint the Levites [over the Tabernacle of the Testimony]” (Numbers 1:50). Why? It is because they are loyal to Me. During its dismantling and its erecting, too, I do not want others to dismantle it and erect it, only them. That is what is written: “And when the Tabernacle travels, [the Levites shall dismantle it, and when the Tabernacle encamps, the Levites shall erect it]” (Numbers 1:51). Is it possible that the mitzva is incumbent upon the Levites, but if an Israelite did so it is permitted? The verse stated: “And the stranger who approaches shall be put to death” (Numbers 1:51). Likewise it says: I hate doers of perversity” (Psalms 101:3) – this is Israel that strayed from after the Omnipresent and crafted the calf, and the Holy One blessed be He despised them from being His trustees.
Do not say that it was that Israel would not touch it [only] during the journeys, rather, also during the encampments, only the children of Levi would approach it. That is what is written: “The children of Israel shall encamp, each in his camp.… And the Levites shall encamp around the Tabernacle of the Testimony” (Numbers 1:52–53). Why do I caution them that Israel should distance themselves from the Tabernacle? It is so there would not be fury upon them, as they are unworthy to approach it. That is what is written: “And there will not be fury against the congregation of the children of Israel” (Numbers 1:53). But the Levites will protect it; that is what is written: “The Levites will protect the watch of the Tabernacle of the Testimony” (Numbers 1:53). “The children of Israel did according to everything that the Lord commanded Moses, so they did” (Numbers 1:54) – as they distanced themselves from the Tabernacle and provided room for the Levites to encamp around the Tabernacle.
פֿרעגט אַ רבֿBookmarkShareCopy

Midrash Tanchuma

(Numb. 4:18) “Do not cut off.” This text is related (to Nahum 1:7), “The Lord is good, a shelter in the day of trouble; He knows those who trust in Him.” The nature of the Holy One, blessed be He, is unlike the nature of flesh and blood.131Numb. R. 5:3. In the case of a king of flesh and blood, when a province rebels against him, he acts against it with an indiscriminate punishment132Gk.: androlempsia or androlepsia (“seizure of foreigners” in reprisal for murder committed abroad). and kills the good along with the bad. Now the Holy One, blessed be He, is not like that. Rather, when a generation provokes Him, He saves the righteous and destroys the wicked. The generation of Enosh sinned. He destroyed them but rescued Enoch, as stated (in Gen. 5:24), “And Enoch walked with God.” Why? (Nahum 1:7:) “[The Lord is good, a shelter] in the day of trouble; He knows those who trust in Him.” The generation of the flood provoked Him. So He destroyed them, as stated (in Gen. 7:23), “And He blotted out all existence”; but He rescued Noah, as stated (in Gen. 6:8), “And Noah found favor [in the eyes of the Lord].” And similarly with the Sodomites, He destroyed them, as stated (in Gen. 19:24), “Then the Lord rained down upon Sodom”; but He rescued Lot, as stated (in vs. 29), “and sent Lot away.” He brought darkness upon the Egyptians, but (according to Exod. 10:23) “all the Children of Israel had light in their dwellings.” Why? (Nahum 1:7:) “[The Lord is good, a shelter] in the day of trouble; He knows those who trust in Him.” They went forth from Egypt and came to the desert. [There] they committed that deed (i.e., the incident of the golden calf), [all] except for the tribe of Levi. Thus it is stated (in Exod. 32:26), “[So Moses stood up in the gate of the camp and said,] ‘Whoever is for the Lord, to me!’ And all of the sons of Levi gathered to him.” [What is the meaning of “Whoever is for the Lord?”] Whoever (in Exod. 32:3) has not given a ring for the calf, let him come unto me. [To him] the Holy One, blessed be He, said (in Nahum 1:7), “[The Lord is good, a shelter] in the day of trouble; He knows those who trust in Him.” Moshe immediately arose and killed the sinners, as stated (Exodus 32:28), “And the Children of Levi did like the word of Moses.” With reference to the tribe of Levi, however, which gave their lives for the name of the Holy One, blessed be He, He thus said to Moses and Aaron (in Numb. 4:18), “Do not cut off….” And so He says in another place (i.e., in Numb. 3:15), “Enroll the Children of Levi.” But He has also said (in Numb. 1:49), “However, you shall not enroll the tribe of Levi.” Why? In order to exclude them from the decree. As the Holy One, blessed be He, foresaw that Israel was going to provoke Him and said to them (in Numb. 14:29), “In this desert shall your carcasses drop.” Therefore, the Holy One, blessed be He, said, “The Children of Levi shall not be [part of] this decree, as stated (in Numb. 1:49, cont.), ‘nor shall you take a census of them as part of the Children of Israel.’ Why? Because they are Mine, as stated (Numb. 3:12), ‘and the Levites shall be mine.’” Thus when anyone offers (rt.: qrb) a little of himself, they advance (rt.: qrb) him a lot. Now they had offered (rt.: qrb) themselves, when Moses said (in Exod. 32:26), “Whoever is for the Lord, to me!” And not only that, but the Holy One, blessed be He, said (according to Numb. 1:50) “You shall enroll the Levites to be over the tabernacle of the testimony.” Thus when someone is tested in [one] area and found trustworthy, the Holy One, blessed be He, trusts him forever; for so you find in the case of Joshua.133Numb. R. 1:12. When he was tested with Amalek, he prevailed against him according to the law and according to the commandment. It is so stated (in Exod. 17:13), “And Joshua defeated Amalek and his people….” The Holy One, blessed be He, said to him, “From your tribe (Ephraim) I am raising up one to exact punishment from Amalek, as stated (in Jud. 5:14), “Out of Ephraim came those whose root is in Amalek….” What is the meaning of out of (mny) Ephraim? He appointed (mnh) Ephraim alone to destroy the seed of Amalek. The Holy One, blessed be He, said to him (ibid., cont.), “’After you, Benjamin with your peoples,’ [i.e.,] leave him for Saul ben Kish, the Benjamite; he will uproot him.” Another interpretation (of Jud. 5:14), “Out of Ephraim.” Saul was tested and found untrustworthy in his commission. Rather (according to I Sam. 15:9), “But Saul and the people spared Agag.” He put him back after him (i.e., behind Ephraim, the tribe of Joshua and Samuel) and the kingdom was taken from him, as stated (in Jud. 5:14), “after you (i.e., Ephraim), Benjamin with your peoples.” And I have also tested this tribe (of Levi), and they have been found to be preserving My honor; for they have given their life for the sanctification of My name (in Exod. 32:27-28), “Let each one put his sword on his thigh [….] So the Children of Levi acted according to the word of Moses,” and they did not show favoritism. Therefore, Moses blesses them and says to them (in Deut. 33:9), “Who says of his father and mother, ‘I do not consider them […].’” And [so] I am also advancing him and making him My imperial agent.134Lat.: frumentarius (“grain dealer”). and I am entrusting him with My house and My sanctity, as stated (in Numb. 1:50), “But you shall enroll the Levites to be over the tabernacle of the testimony….” And what was it that I told you (in vs. 49)? “However, you shall not enroll the tribe of Levi.” [This prohibition] was to exempt them from the decree which I was going to pronounce over Israel. It is simply that I am allotting them great honor. When you number them, [number them] by themselves through the Divine utterance (in Numb. 3:15), “Enroll the Children of Levi.” Now if I have honored the Levites, who bear the tabernacle, how much the more so in the case of the Children of Kohath, who bear the ark, [as stated] (in Numb. 3:31), “And their duties included the ark, the table, the lampstand, the altars, [….]” He therefore said to them (in Numb. 4:18), “Do not cut off [the tribe of the Kohathite families from the Levites].” The Holy One, blessed be He, said, “And if because the Children of Kohath have feared Me, I have allotted glory to them and to their children; then [I will honor] whoever stands in awe of Me and not cut off his name from the world.”135Numb. R. 5:9. From whom do you learn this? From the children of Jonadab ben Rechab. Since they did his will, what is stated about them? (Jer. 35:19), “Someone belonging to Jonadab ben Rechab shall not be cut off from standing before Me forever.” And if in the case of those who are proselytes, because they have done My will, I have done likewise for them (i.e., what they want); in the case of Israel, when they are doing My will, how much the more shall they neither be cut off nor have their name be erased from before Me? Rather, they shall live and abide forever and ever and ever, as stated (in Deut. 4:4), “But you who clung to the Lord your God are all alive today.”
פֿרעגט אַ רבֿBookmarkShareCopy

Midrash Tanchuma Buber

[Another interpretation (of Numb. 4:18:) DO NOT CUT OFF.] And so he says in another place (i.e., in Numb. 3:15): ENROLL THE CHILDREN OF LEVI. But he has also said (in Numb. 1:49): HOWEVER, YOU SHALL NOT ENROLL THE TRIBE OF LEVI. But he only spoke to him <with reference to numbering them in> the midst of the children of Israel and did not tell him to exempt them from the decree <itself>.158Tanh., Numb. 26, cont.; Numb. R. 1:12; 3:7. The Holy One <did so> because he foresaw that Israel was going to provoke him and said to them (in Numb. 14:29): IN THIS DESERT SHALL YOUR CARCASSES DROP. Therefore, the Holy One said: The children of Levi shall not be <part of> this decree, as stated (in Numb. 1:49, cont.): NOR SHALL YOU TAKE A CENSUS OF THEM AS PART OF THE CHILDREN OF ISRAEL. Why? Because they are mine (according to Numb. 3:12): AND THE LEVITES SHALL BE MINE. Thus when anyone offers (rt.: QRB) a little of himself, they advance (rt.: QRB) him a lot. Now they had offered (rt.: QRB) themselves, when Moses said (in Exod. 32:26): WHOEVER IS FOR THE LORD, <COME TO ME>. And not only that, BUT (according to Numb. 1:50) YOU SHALL ENROLL THE LEVITES TO BE OVER THE TABERNACLE OF THE TESTIMONY. Thus when someone is tested in <one> area and found trustworthy, the Holy One trusts him forever; for so you find in the case of Joshua.159Numb. R. 1:12. When he was tested with Amalek, he prevailed against him according to the law and according to the commandment. It is so stated (in Exod. 17:13): AND JOSHUA DEFEATED <AMALEK AND HIS PEOPLE>…. The Holy One said to him: From your tribe (Ephraim) I am raising up one to exact punishment from Amalek, as stated (in Jud. 5:14): OUT OF EPHRAIM CAME THOSE WHOSE ROOT IS IN AMALEK…. [What is the meaning of OUT OF (MNY) EPHRAIM?] He appointed (MNH) Ephraim in his heart160Cf. the parallel in Tanh., Numb. 1:26, which reads, “Ephraim alone….” to destroy the seed of Amalek. The Holy One said to him (ibid., cont.): [AFTER YOU,] BENJAMIN WITH YOUR PEOPLES, <i.e.,> leave him for Saul ben Kish, the Benjamite; he will serve him.161Cf. the parallel in Tanh., Numb. 1:26, which reads, “He will uproot him.”
פֿרעגט אַ רבֿBookmarkShareCopy