Noah had messed up and his foolishness had made him vulnerable. But mocking the unwise can lead to your own downfall, as Ham discovered (Genesis 9 v 24). When others make mistakes, we need to be quick to support them and help them back up, not stand around gawping and gossipping.
What I want to know, thought, is who told Noah? He’d been totally out of it, so someone must have clatted. Sibling one-upmanship at work no doubt. And it worked! Noah was mad at Ham, and cursed him. The other brothers came out squeeky clean, but one of them at least had done the dirty on Ham. And for this they were blessed?
In recent centuries, this curse was used by some sectors of the church to excuse slavery and aparteid. Personally, I don’t believe it was a prophecy, just the angry ramblings of a tired old man. But how quick we can be to take advantage. Just as Shem or Japheth did in getting Ham into trouble with dad, these ‘Christians’ grabbed a convenient piece of the bible to justify their selfishness.
This is where understanding the bible can get really complicated if we let it. But it doesn’t have to. Apply the ‘Golden Rule’ ie to love God, and to love your neighbour. If our understanding of scripture doesn’t work with that, we’ve got it wrong.