Vayikra17:7

וְלֹא־יִזְבְּחוּ עוֹד אֶת־זִבְחֵיהֶם לַשְּׂעִירִם אֲשֶׁר הֵם זֹנִים אַחֲרֵיהֶם חֻקַּת עוֹלָם תִּהְיֶה־זֹּאת לָהֶם לְדֹרֹתָם׃

And they shall no longer offer their sacrifices to the goat-demons after which they go astray. This shall be a statute forever for them throughout their generations.

Vayikra 17:7

וְלֹא־יִזְבְּחוּ עוֹד אֶת־זִבְחֵיהֶם

Vayikra / Leviticus 17:7 · Remez

Vayikra 17:7

וְלֹא־יִזְבְּחוּ עוֹד אֶת־זִבְחֵיהֶם לַשְּׂעִירִם אֲשֶׁר הֵם זֹנִים אַחֲרֵיהֶם חֻקַּת עוֹלָם תִּהְיֶה־זֹּאת לָהֶם לְדֹרֹתָם׃

And they shall no longer offer their sacrifices to the goat-demons after which they go astray. This shall be a statute forever for them throughout their generations.

Remez רֶמֶז

The word "stray"

Sometimes a person breaks no law, yet betrays the one who trusted him. What do you call that?

Malbim: the words "after whom they go astray" (זֹנִים) cover any worship of other gods. Scripture compares a people faithful to its Almighty to a faithful wife, and one who serves another to an unfaithful one. Midrash Lekach Tov: each word at the end of the verse teaches its own lesson: "a statute forever" is said of the Temple, "shall be" means in our time too, "this to them" means without the penalty of karet, "throughout their generations" means that the ban holds always.

How Malbim and Midrash Lekach Tov explain it

Malbim And they shall no more offer their sacrifices to the se'irim

The Torah explains why it is forbidden to slaughter offerings outside the Sanctuary: so Israel will separate from the impurity of the nations, who sacrificed in the field and in the wilderness to the se'irim and the demons that dwell in the wilderness. On the demons and why they are called "se'irim", see at length in Ramban. And Ralbag wrote that the demons were linked with Saturn, as is explained in the study of the stars, and Capricorn (גְּדִי) is the house of Saturn, so the demons were called "se'irim", goats. And Rabbi Ovadyah Sforno has already explained that the demons were in no way held to be gods, but people wanted their company: that the demons would serve them and help them in their affairs or in errands to a distant land. But then the words "after whom they go astray" do not fit. So the words "after whom they go astray" must include all worship of other gods. For every unfaithfulness spoken of the whole people is the worship of stars and constellations. Scripture compares the people faithful to its Almighty to a wife faithful to her husband, and one who turns from Him and serves another to an unfaithful woman who "forgets the covenant of her Almighty" and leaves the companion of her youth (Mishlei / Proverbs 2:17). And the words "a statute forever" are said of the Temple, "throughout their generations" means that the law holds in all generations, as will be explained at length in the portion Emor. The word "shall be" means in our time too, in the view of the one who says that once the high places were forbidden, they were never permitted again. And "this to them" means that there is no karet for them: this is about offerings that were consecrated while the high places were permitted (Zevachim 107b).

Midrash Lekach Tov And they shall no more offer their sacrifices to the se'irim

Se'irim are demons, as it is said: "and se'irim shall dance there" (Yeshayahu / Isaiah 13:21). "After whom they go astray": to include every other worship of the stars too. "A statute forever": for the Temple. "Shall be": even in our time. "This to them": and there is no karet for them. "Throughout their generations": so that the ban on blood holds in all generations.

Takeaway

Karet (כָּרֵת), "cutting off", is a penalty from Heaven for grave wrongs, not carried out by a court.
High places (בָּמוֹת) are altars outside the Sanctuary. Before the Tent of Meeting was set up, it was permitted to offer sacrifices on them (Mishnah Zevachim 14:4).