Religion is a human need - maybe not an obvious animalistic one but because it crops up with every civilization, I think it isn't something on the outside, it's something within us.
Wheather you think it's a means of social control, a way to create distinct in-vs out group, a means to cope with death or whatever you attributes you give to it..
Just because you can rationalise it doesn't mean it goes away.. just like you can't suppress base biological urges by "thinking them away", atleast not in the long term.
Religion just comes back up in other places in forms that don't even look like the original thing but shows all the signs of it.