"I was reading Genesis 9.20-27 and came across a puzzle. In this passage, Noah's son Ham sees his father's nakedness' and tells his brothers. When Noah wakes up and discovers what has happened he curses Canaan, not Ham. I don't get it . . . Canaan wasn't born yet and he didn't do anything wrong. Why was he cursed and why was Ham not cursed?"
This is one of those passages most folks simply pass over and forget about--because tradition tells us Ham was cursed, but of course you've discovered this isn't the case. The traditional answer is Ham was cursed vicariously because his youngest son was cursed. However, the difficulty with this postulate is generally curses were put on the oldest son, since the oldest was the most vulnerable to a curse. Further, the fact that Ham was not cursed is curious, for he would have been the most likely to have deserved the curse.
There is, however, another possible solution, albeit not a nice one. To understand this thought we first have to understand the metaphor "his father's nakedness." Traditionally the sin of Ham is thought to have been seeing and poking fun at his drunken father who lay naked on the floor of his tent. However, except for the dishonoring of his father, this is hardly a break of any commandments, and the curse seems rather harsh for such a crime. However, when the term "his father's nakedness" is exposed, there is a light of understanding. Leviticus 18.7-8 sheds light on what this term means: "You shall not uncover the nakedness of your father, which is the nakedness of your mother; she is your mother, you shall not uncover her nakedness. You shall not uncover the nakedness of your father's wife; it is the nakedness of your father" (Leviticus 18:7-8). Thus to see the "nakedness of his father" implies he saw Noah's wife naked.
In a further study we find in Leviticus 20.11 that to "uncover his father's nakedness" is to lay with his father's wife, that is to have intercourse with her. With this in mind, it becomes more clear as to the possibilities for the curse. The scenario thus reads like this; for whatever reason, Ham enters his father's tent. His father is in a drunken stupor; perhaps Noah's wife was as well. In any case, it seems Ham may have indulged in a debaucherous act that resulted in the impregnation of his mother (perhaps this is where Sophocles got his idea for Oedipus Rex). When Noah woke up and discovered what had happened he didn't curse either his wife nor his son, for whatever reasons, but instead cursed the fruit of the union, Canaan, which means humiliated--a state in which Noah found himself.
The curse of Ham has really always been the curse of Canaan, for according to the story Ham's other sons all prospered in their respective lands, and Ham lived a prosperous life as well. Only Canaan, the child of a possible illicit affair, received the full weight of Noah's curse.