It's one thing to glorify violence, because most people take it for what it is, which is entertainment. "It Was Written" is not going to persuade a kid into trying to be a coke kingpin.
But it's another thing to glorify gangs, which for certain individuals, is something they see every day in real life. I'm not saying a kid is going to join a gang just because he saw rapper flagging. But that kind of stuff affects your subconcious, and when you grow up watching "celebrities" repping that just further legitimizes the gang in the back of your head.
There would be a gang problem regardless, but this ain't helping the situation.