I think it mostly boils down to public housing and police activities.
The public housing situation forces people together into small areas, which can be territorial. When I was living there, Chicago was territorial in and of itself, even though it had gotten better than it had been. Packing low-income people together into projects only makes it worse, because they have little say in where they live. Plus, because education in Illinois is funded through property tax, the education system in these neighborhoods can be very bad. There are some very good public magnet schools, such as Whitney Young, but everything is stacked against kids from these neighborhoods getting in. There is next to no opportunity to get out of neighborhoods like that.
The police are also a huge part of the problem. Their attitude seems to be to let everyone run amok, and let “those people” sort it out for themselves and kill themselves and each other off. When they don’t, they act as an occupying force. They are not there to help but to suppress, and to indiscriminately target the residents whether they did anything illegal or not. They are criminals for living there, from the police point of view.