Why punish the son, or even worse, all the descendants (as at Gen 9:24-27)?

“Have we not seen by now numerous examples,” a critic asks, “of a sort of mean-spirited stereotyping by God? Why support this unfair treatment based on their accidental family grouping? Is this not merely a primitive sort of tribal bigotry, which is being put into the person of the Holy God?” How are we to answer this question? Early, primitive people were very tribal and bigoted; as with other unfortunate practices, such as wars of conquest, slavery, and polygamy, words in a holy book were sadly not going to extirpate these practices. Only time, under the gentle guiding hand of religion, would have a chance to affect that. You will notice here that the curse is given by Noah, not by God, who does not mention it in justifying the invasion of Canaan and the extirpation of the Canaanites. God has his own reasons, which we will return to. Note also that Cain’s entire family line was not specifically cursed; only Cain was. But Cain’s bad habits happened to give rise to bad descendants. So, thus far, we do not have any examples of God himself engaging in anything like “mean-spirited stereotyping.” But we will have to come back to this and similar issues later.