After the Mabul, Noach set out to rebuild the world. In time (by then, Cham had a child, Canaan), the soil flourished and he succeeded in planting grapes. He must have been ecstatic to know that there was hope for the future. He became drunk from his first taste of wine (quite possibly unintentionally) and went inside his tent to not be seen this way in public. The Torah describes his state of being as being “uncovered”. RSRH explains that this is not necessarily intended to be understood literally (he quotes sources for a broader meaning of the word ויתגל, uncovered). It means his weaker side was exposed. In that state he would not be viewed as the dignified father he was, and so he wanted privacy, to not be seen that way.
His son Cham followed him into the tent and reported what he saw to his brothers, who remained outside, in vivid detail (ויגד). He enjoyed witnessing the event and thought that the story would entertain his brothers. His brother’s reaction was to walk in backwards and cover their father’s nakedness (Shem at the lead and Yefes followed) (Is this part of the story literal? See below for its metaphorical lessons. GS).
The whole future of mankind depends on how children act towards their parents. As long as children regard their parents as keepers of God’s charge, revering their parents spiritual essence and not focusing on their physical essence, mankind flourishes. The children learn lessons from the parents and can grown and develop them further. But if the children delight in the physical side of the parents, if there is no reverence for the father, then the continuation from one generation to the next doesn’t occur. The important lessons of the past will not inform the future. The younger generation will consider the older generation obsolete.
Honoring and revering father and mother is the foundation for all of mankind’s development.
When Noach woke up and realized what had happened, he said that Canaan, the son of Cham, is cursed. Note that Noach didn’t say Cham is cursed. Noach’s lesson is: “Honor your father and your mother, lest you be punished through your children.” Sins that children commit against their parents will be punished by the manner in which their own children, in turn, deal with them.
The younger generation must “take a garment and cover their parents’ nakedness”, looking for the spiritual legacy they can take from then, so as to build their own future. If instead, they scorn their parents’, looking only at their frailties and weaknesses, they have nothing to build on and they have no future.
Beraishis 9:20-25
pages 236-243