Allah (SWT) Helps His sincere servants to avoid damaging themselves when they are sincerely seeking His help. Nevertheless, it does not mean that He stops every sinner or criminal. Human beings were granted intellect which guides them to the right as well as the messengers who guided people to the right path and warned them from the wrong ways. Every human being is responsible of his own deeds. Allah (SWT) Helps those who want to do good, and even protect sincere servants from falling in sinful acts under certain circumstances, but Allah Has granted human beings the option to decide their their own deeds with out any pressure from Him and Promised to reward the good deeds and punish the criminals in their own evil deeds.
Wassalam.