What is the connection between the current Pesukim?
Seforno: Now that you see that Hashem is prepared to send you into exile in the event that you sin, 1 take care to observe His Mitzvos without adding to or subtracting from them, not even if the reason behind the Mitzvah no longer applies. 2 Because the slightest deviation from the Mitzvos brings destruction in its wake - like what happened by Ba'al Pe'or, where the men intended only to have Z'nus 3 with the Midyanite women without worshipping their idols. 4 But in the end, everyone who began with Z'nus ended up serving idolatry, and was wiped out.
Divrei Eliyahu: The Torah said "Al Tifnu El ha'Elilim"