It would be a second or third order effect. It stands to reason that someone who is a part of a strong religious community would have a much better social life, support structure, and network. All of these things reduce the likelihood of getting addicted to hard drugs. You could also take it a step further and say that having such things makes breaking an addiction/rehab more likely to be successful, too.