The story of Noah begins with him walking in righteousness and obeying the Lord (6:9). It ends with him drunk and naked in his tent, cursing Canaan. Even after the great flood, people still showed sinful behaviors that led to the flood.
The text emphasizes the cursed origin of the Canaanites, a corrupt and idol-worshiping group. Israel would later remove them from the promised land (see also 15:16 and study note; Leviticus 18:3; 20:23).