“You shall not plant any tree as a sacred pole beside the altar that you make for Yahweh your God. Nor shall you set up a stone pillar, things that Yahweh your God hates. You must not sacrifice to Yahweh your God an ox or a sheep that has a defect, anything seriously wrong. That is abhorrent to Yahweh your God.”
There should be no hint of any kind of deviant worship with sacred trees, sacred poles or sacred stones near the altar of Yahweh. The sacrifices of animals must be perfect not throwaways.
“If there is found among you, in one of your towns that Yahweh your God is giving you, a man or woman who does what is evil in the sight of Yahweh your God. They have transgressed the covenant by going to serve other gods and worshiping them, whether the sun or the moon or any of the host of heaven, which I have forbidden. If it is reported to you or you hear of it, you should make a thorough inquiry. If the charge is proved true that such an abhorrent thing has occurred in Israel, then you shall bring out to your gates that man or that woman who has committed this crime. You shall stone the man or woman to death. On the evidence of two or three witnesses the death sentence shall be executed. A person must not be put to death on the evidence of only one witness. The hands of the witnesses shall be the first raised against the person to execute the death penalty, afterwards, the hands of all the people. So you shall purge the evil from your midst.”
Once again we have a very strong statement against idolatry within Israel’s own towns. If you hear about it, it must be investigated. If the charge is true by 2 or more witnesses, then that person should be stoned to death, led by the witnesses. Evil must be purged from your midst.