Religion can make people walk away from God because no one can live up to the standards that they are told to meet. Christianity teaches you about righteousness, which is a gift from God and has nothing to do with how good or bad you think you are; it only has to do with how good God is.