In 9:18-27 we read about the incident in which Noah's middle son, Ham, defiled his father's honor. His father awoke from his drunken stupor, realized what had happened and proceeded to curse Ham.
When the incident takes place, the Torah says, "Ham the father of C'naan". Rashi tells us the reason why it brings C'naan into the picture despite his not having been involved in the incident was because Noah cursed C'naan in order to punish Ham so it relates Ham to C'naan to let us know in advance (until now we had not yet been told C'naan is Ham's son, so now it is letting us know). Why punish C'naan? Because by Ham defiling Noah he prevented him from having a fourth child, so he punished/cursed the fourth child of Ham.
But why not punish Ham directly? At least in addition to punishing C'naan - C'naan did not do anything, so Ham should at least get part of the punishment if not the bulk of it?
Also, throughout this section of the parsha it vever mentions Ham on his own - it is always Ham the father of C'naan. It would have been enough for Rashi's lesson just to say it once, but it says it a couple of times and then Noah curses only C'naan and even when it happens it does not say Ham's name but says Noah realized what his youngest son had done - why is Ham absolved of the responsibility of his actions?
I do not have a good answer for this. It seems that maybe the connection between Ham and C'naan was so strong that punishing C'naan was like punishing Ham. Maybe Cnaan was his favorite son and they had a strong bond so by punishing Cnaan it was destroying Ham as well. Not a very good answer.
If you have any thoughts on this, feel free to put them in the comments.