“So these nations worshipped Yahweh. But they also served their carved images. To this day their children and their children’s children continue to do as their ancestors did.”
This is really the justification for the discrimination against the Samaritans. They worshiped Yahweh, but they also worshiped other images. They were not pure Yahweh worshipers. Thus the biblical author says that this continues to the present day as their children’s children follow the evil way of their ancestors. The left over Israelites with the newly installed foreigners had hybrid Yahweh worship in Samaria, not like the pure worship servers of Judah. Thus the Samaritans have become second class Israelites, not like those in Jerusalem.