Love-hate relationship. I grew up with it being the choice of music, so I have a bond with it. A bond that I really don't want, anymore. But, I view it as a consequence of Civil Rights. Ultimately, it is blow back from all the inequalities from the past. We're only 65 years out of Civil Rights: a generation ago. But it's a virus in the poor community. Or a symptom of the virus.
People say "it's just music", but music can have a profound effect on you. It can make you happy; it can make you sad; it can make you angry; and, likewise, it can influence you to want to do things. It's not "just" music, but it reinforces existing influence.
Ultimately, it's a result of pervasive black poverty and feelings of inequality. Just compare 1950s black people with 2016 black people. Not all, I'm just saying there is a distinct change for the worse. Being "ghetto" became desirable after rap made it so. I really like rap. I grew up with it. But gangsta rap is really just a bad influence, promoting sexism, hatred of police, murder, stealing, etc.
Even in Tupac and Biggie's music, for every social stance or "negative realism" song, there's another 3 or 4 glorifying murder and hustling. I really think that blew up thug culture. Rather than having the effect of dissuading people from being thuggish, it made them *want* to be a thug.
Of course, there are people who can listen to it pretty much completely separated from that influence, but there are a lot of people who can't.
It needs to die before we can progress to a better society. Separating "gangsta" rap from just "rap". It's like having a music genre called "rape rap", then saying "Oh, no, rape rap isn't bad. It's just music." Hell, there are quite a few instances of rape being glorified in gangsta rap.
But. It has power in it. And I think that's why a lot of people are attracted to it.