Ham's indecency and Noah's curse reflect an era in which Canaanites still represented an ever-present danger. Moreover, according to the first chapter of the book of Judges, as opposed to the book of Joshua, the Israelite conquest of Canaan was gradual, protracted and far from complete. It is for this reason that the patriarchal narratives exude a consistent antipathy toward the indigenous Canaanites. They are not to be a source for marital partners. In part then, the religion of Israel defines itself over against the perceived depravity of Canaanite civilization.
Monotheism comes with an extensive set of sexual constraints.
To violate them is to pollute the land and risk expulsion. The chosenness of Israel must express itself not only in its lofty theology but also in the purity of its sexual ethic. As long as Canaanites abounded in the land they threatened to dilute both. Hence the command to drive them out. Israel's mission is to transcend the ethic of self-gratification that lies at the heart of Canaanite religion.