Ham was the father of Canaan: See also 9:20–27; 10:6–20. The text repeats this idea to show a connection between Canaan and Ham. It explains that the people of Canaan came from Ham’s family line.
This connection also points back to Ham’s shameful act (a serious dishonor) in 9:20–27. Because of this, the identity of the Canaanites is closely tied to that event.
The people of Egypt (where Israel lived as slaves) and the people of Canaan (the land Israel later entered) both came from Ham’s descendants (10:6; see Leviticus 18:3, 24–26; Psalms 105:23, 27; 106:22).
Later stories in Genesis describe moral failure (wrong behavior) in both places. Egypt is shown this way (Genesis 12:10–20) and Canaan (34:1–31; 38:1–30; see 9:20–27 and 10:6–20).