My theory is that a certain percentage of people that know they have a problem but don't know what to do about it take up religion as a defense. They hope that praying enough and being 'Christian' enough can stop their 'sinful' urges. A lot of Christian propaganda encourages this sort of thinking. All that talk of being 'Born again in Christ.' and stories of people that converted and instantly gave up lives of crime.
But it doesn't seem to work in general. What actually happens is that the dangerous desires just get suppresed further, and the person pushes towards greater and greater fanaticism as a defense against those urges. And then eventually a chance to act on those urges arise, and all hell breaks loose.
Jay