A Kills B (at this point he has completed the act and the crime of manslaughter/murder has been comitted)
Police Arrest A, interview, obtain evidence etc.
The CPS then have a decision making process to follow:
1) Did A kill B?
2) Does A have a defence to that act? There are a number of statutory defences - insanity, being forced to under duress, or in this case, self defence.
3) Did A Have lawful authority to Kill B? Any other "excuse?"
4) Is it in the public interest, all things considered, to prosecute A.
Now, outside of the context of the riot, lets say someone walks into a corner shop and says "Give me all your money". The shopkeeper takes his machete out and decapitates the wannabe robber. The decision in those circumstances could be to prosecute: The shopkeeper has not been directly threatened, and you could argue that his use of force was plainly excessive in the circumstances. He has no defence, and prosecution is in the public interest as we don't want shopkeepers thinking they can escalate to such levels of violence unprovoked.
Fast forwards to the Riots: Shops and livelyhoods are buring all around, a man is trapped into his shop as he tries to board up by a pack of youths, who begin to assault him. For all he knows he is going to be beaten unconscious and left in his burning shop... The stakes have changed and I would suggest that he would be mad NOT to use all means at his disposal to defend himself. He has a defence in law (self defence) and a sucessful conviction is higly unlikely.
But that doesn't change the fact that a crime was comitted intially, but that the perpertator could not be found guilty of it.
It apes the court process:
Prosecution set out their stall. They give their best proof that the crime happened as they say.
Defence raise their case: This may well include such defences as self defence. In murder, that's pretty much standard.