Vayikra / Leviticus 18:30 · Remez
וּשְׁמַרְתֶּם אֶת־מִשְׁמַרְתִּי לְבִלְתִּי עֲשׂוֹת מֵחֻקּוֹת הַתּוֹעֵבֹת אֲשֶׁר נַעֲשׂוּ לִפְנֵיכֶם וְלֹא תִטַּמְּאוּ בָּהֶם אֲנִי יְהוָה אֱלֹהֵיכֶם׃
So you shall keep My charge, not to do any of the abominable customs that were done before you, and not make yourselves impure with them. I am the Eternal your Almighty."
Remez רֶמֶז
A charge for the charge
A doubled word is like a double fence. Why a second one, if there is a first?
Malbim: in the words "keep My charge" a noun of the same root stands beside the verb, and this calls for interpretation: keep the charge too, that is, the fences around the bans, such as the secondary bans on intimacy. That is why it is said to be a warning to the court: the court sets the fences. And "do not make yourselves impure with them", with the letter bet (ב), speaks of impurity of the soul, not of the body. Bartenura: "a charge around My charge" means the sages' fences, such as the secondary bans on intimacy and the sages' Shabbat bans.
How Malbim and Bartenura explain it
Malbim So you shall keep My charge
It has already been explained (on Vayikra, section 13): wherever a noun of the same root is added to the verb, there is an interpretation in it. The sages interpreted that one must keep the charge too, that is, the fences made for this, such as the secondary bans on intimacy. So it is said in tractate Yevamot (21a). That is why they said this is a warning to the court: for it is the court that sets the fences and walls through which the people will be kept from touching the abominable customs themselves. And on the words "and do not make yourselves impure with them" it has already been explained (on Vayikra, section 306): every word "impurity" followed by the letter bet (ב) speaks not of impurity of the body but of impurity of the soul. This is what is meant by "it teaches that all forbidden unions are called impurity". For it was already said: "Do not make yourselves impure with any of these things" (Vayikra / Leviticus 18:24). But since impurity is mentioned only with a woman in her separation, a married woman and an animal, I might have said that the word "impurity" was used only because of them, since they are spoken of last, and not of the bans on close kin. So it says again: "and do not make yourselves impure with them", for all of them are called impurity. An example of this is at the end of the portion Shemini: "and do not make yourselves impure with them" (Vayikra / Leviticus 11:43). This too is impurity opposed to holiness, which is why the letter bet (ב) stands there too, as we explained there (section 166). And there it says "so that you become impure through them", and it is interpreted that in the end they will become impure through them and be distant from the Eternal, because this dulls the heart, as explained there (section 167). Against this it says: "I am the Eternal your Almighty." The name "Almighty" with the word "your" speaks of the bond of the Eternal with Israel: how then will you distance yourselves from Me by the impurity of your souls and become liable to destruction? So too Ezra, when he said: "Shall we again break Your commandments?" (Ezra 9:14), mentioned the name "the Eternal, the God of Israel", because this is His bond with them.
Bartenura Make a fence for the Torah
A fence so that one does not come to touch a ban of the Torah: such as the secondary bans on intimacy and the sages' bans on Shabbat (שְׁבוּת). As it is written: "So you shall keep My charge" (Vayikra / Leviticus 18:30), that is, set a charge around My charge.
Takeaway
The secondary bans on intimacy (שְׁנִיּוֹת לַעֲרָיוֹת) are relatives of the next degree whom the sages forbade, such as a grandmother (Yevamot 21a).
The word "dulls" (יְטַמְטְמוּ) sounds like "you become impure" (וְנִטְמֵתֶם): the interpretation rests on this likeness of sound (Yoma 39a).