I don't know to be honest. I researched some psychology papers awhile back and many of them had different theories. Some of them argue it due to in-group preference which also known as tribalism as in it's in our evolution to survive.
It's same question as to why do intelligent people believe or behave irrationally.
I don't know, but it's a really interesting topic.
Also, most people here are mostly joking I'm guessing. So, if you see people who post memes of Black-Americans/Pan-Africanist or other Somali clans, it's just banter. There probably a few that really hate some people, but's that's them.