Thirty years ago, the only guys the hug-n-thump thing were bruthas in da 'hood. Gangs also had special handshakes/embraces that signified membership. I would theorize that it slowly seeped out into the general population along with other elements of hip-hop culture.
When I was young, it specifically was
not done, unless the person was a blood relative. There was no secret why it was frowned upon.
My experience suggests hip-hop has little or nothing to do with it, because the people involved have no contact with, nor interest in, hip-hop.