It comes from the 60’s and 70’s when blacks would wear the hoodie as a symbol of their hatred of whites and being part of what they called the Black KKK.
A lot of blacks still wear it for that reason today. It's an in your face display of openly showing you hate whites.
It's perfectly acceptable for blacks to wear a hood and openly show their hatred for whites, but if a white puts on a hood they have committed a hate crime.
First...I’ve ever heard of that.
Sounds like urban myth. It's more likely that hoods became popular for the same reason that KKK hoods were popular: to conceal your identity from casual observation.
A guy wearing a hoodie is going to have his face being less visible to security cameras, and is less likely to be recognized at a distance by rival thugs.