This is to prevent them from teaching you all the offensive things that they do in worshiping their gods, and by doing so make you sin against the Lord your God.