When I lived in Chicago, I spoke to a couple of Chicago PD members about this, including an uncle.
They told me every week the city had one or more "unexplained" shootings where a person was found shot dead at close range, but not robbed.
More often than not, the deceased had a lengthy criminal record for assault, robbery, rape, etc.
Yes, some were assassinations by rival gang members, but a significant percentage were probably the result of a bad guy trying to rob a person who was carrying illegally - a single woman, a shopkeeper, a small businessman, just a regular member of the public whose business took them into a bad or transitional area.
And since the bad guy carefully chose a time and place where there were no police around to nab him for trying to rape or rob someone, well, that just meant there were no police around to nab the intended victim for shooting the bad guy. Unless the shooter became a Charles Bronson wannabe and did the same thing over and over (which AFAIK just didn't happen) the odds of their being caught and prosecuted were low . . . especially since, at that time, finding the person who shot a known bad guy wasn't a particularly high priority for CPD.
Note that if caught after such a shooting, the law would probably treat a young & attractive 5'6" 110 lb female rape target rather differently than it would treat any guy. In Chicago today, expect to be charged with everything from terrorism to a hate crime.