Because religion provides comfort, community and a meaning to people's existence that goes beyond "we were born of chance on an insignificant rock somewhere in the universe".
Not always, but the ones that aren't about that are much smaller. E.g. I know a little community of christ church that is very simple and they rotate through the sermon and then have a friendly morning tea after. I'm not religious but it's the only church I've been to where I kinda enjoyed it and I think it does just bring community and no harm. That being said, it's a fringe denomination and isn't really growing, because it's not trying to force itself on others