Perhaps they both influenced eachother.
The Gangsta Rap of the 90s was influenced by the gang culture and street life of South Central Los Angeles of the 70s and 80s.
But then THAT music began to influence the street culture and glorify the gangsta lifestyle in neighborhoods all over America which lead to an increase in drug use, drug dealing, gang banging, and overall criminal activity.
During my school days me and my boys would get hyped up on gangsta rappers like Too Short and NWA before rushing and fighting kids from another highschool and it also encouraged us to get involved in other nefarious activities.
Yet, here we are as middle-aged men. We weren't motivated to rob, steal, kill and sell drugs as a result of music and movies.
I was headed in that direction because of how I admired the gangster lifestyle I heard about and saw not just in real life but on television, in the movies, and in the music!
First and foremost, The SUPREME BEING Protected me from going that route.
A distant second reason is the Nation of Islam got ahold of me and saved me from a lot of that madness back in my late teens.
I realized it was a plan by the enemy for self-destruction.