The problem here is that you are thinking like a normal, rational person.
Most muggers (and probably all knockout game folks) are unthinking and irrational. They don't think anything through. If the opportunity presents itself, and they feel like doing the crime, they'll just do it.
Cameras, a police station around the block, none of that matters much.
There is some merit to what you are saying... I at least agree with the 'unthinking and irrational' part. However, I suspect that there is still a component of "I won't get caught" thinking that is going on... replace that with "it is absolutely guaranteed that I'll get caught" and I suspect that it would have some impact.