“You shall not worship the LORD your God in that way” (v4). God warned the Israelites to be very careful not to adopt the idolatrous practices of their neighbors in the Promised Land. They were commanded to tear down the altars to false gods and to be faithful to worship at “the place the Lord your God shall choose” (v5) – Jerusalem. This was no arbitrary rule about loyalty; the worship of idols involved terrible things like child sacrifice, “abominable things” (v31).
“Be careful to obey … that it may go well with you and your children” (v28). God calls us to moral purity and faithful worship for our own sakes, so that we experience joy and not destruction.