There are clearly more factors at play than what the law says. What do you believe will happen if you drink alcohol in secret, out of range of the eyes of the State? Muslims believe this will still have consequences in afterlife. Atheists don't. Many Christians believe they'll be saved and forgiven by God as long as they are Christian.
> A 2012 study suggested that belief in hell decreases crime rates, while belief in heaven increases them, and indicated that these correlations were stronger than other correlates like national wealth or income inequality.
https://en.wikipedia.org/wiki/Statistical_correlations_of_cr...