Ed Miliband wants an inquiry into the causes of the riots – let me save him the trouble

Criminals are not a separate species - they look just like the rest of us

So shocking were the riots, so at odds with our self-image as a calm and orderly people, that we naturally want an explanation commensurate with the magnitude of events. The idea that the disturbances were nothing more than spur-of-the-moment criminality seems inadequate. We demand deeper causes. If we are on the Left, we blame poverty, racism or police brutality. If we are on the Right, we blame failures in welfare and education that have produced a generation with no sense of responsibility.

All these theories are beside the point. They might be true, but they did not abruptly become true last weekend. While potentially interesting, they don't help us to understand the suddenness or the scale of the unrest. No, to explain what happened we need a more immediate cause; and that cause is staring us in the face.

In any society, a surprising number of people will break the law if they can be reasonably certain of getting away with it. Criminals are not a separate species, wearing stripy suits and carrying swag bags. Most crime is opportunistic, and most people have, at one time or another, committed an offence.

Potential criminals will always outnumber police officers. Law enforcement works on the theory that not all potential criminals will go on a spree at the same moment – just as banking rests on the assumption that we won't all simultaneously withdraw our deposits. When potential criminals realise that the forces of order are overstretched – during a blackout, for example, or in the aftermath of a natural disaster – looting usually follows.

What happened earlier this week was that potential criminals made precisely such a calculation. The trigger was not a power cut or an earthquake, but the television images of police in Tottenham standing by while shops were plundered. Even the dimmest hoodie was capable of making a cost-benefit analysis. If the police were unwilling to defend property on one London high street, they would be quite overwhelmed by more widespread disorder. All that was needed was numbers and, thanks to Blackberry and Twitter, numbers could now be concentrated.

For someone without educational qualifications, crime can be a logical career choice. The chances of detection are meagre, the chances of conviction nugatory, and the chances of incarceration virtually non-existent. This is especially true of those legally classed as juveniles, which explains why so many youngsters were among the malefactors.

I think it's just about possible that you could see your actions refashioned into a noble cause if you were stealing the staples: bread, milk. But it can't be done while you're nicking trainers.

To infer broad conclusions about social security or family breakdown or public spending from the riots is silly. The one obvious lesson to draw is that there was a very serious initial failure of policing. Only when the police stopped treating the riots like a community relations role-playing exercise at Bramshill did the hoodies' cost-benefit analysis change.

I'm not being wise after the event. The monumental incompetence of the Met has been one of this blog's longest-running themes. While individual officers behave bravely – in some cases heroically – under very difficult circumstances, their leadership is often woeful.

Fortunately, a solution is on its way; the requisite legislation is even now clanking through the tubes and chambers of our government machine. Yup: it's time for elected sheriffs.