Then why are many inner city neighborhoods controlled by the gangs to keep the peace?
They aren't there to "keep the peace". They are protecting their turf from other drug dealers.