Governments didn't create religions for the people, the people created religions for the people. It was an understandable way to hypothesis about the universe around us, who doesn't ask questions like: 'Why am I here?' and 'What is the meaning of life'? when they are children?
The community aspect draws people in from all types, it's when you get an event like 9/11 that the scary shit happens. People willing to throw their lives away for a perceived sky-daddy. Religion cheapens the cost of life like nothing else when you're promised with immortality after you die, life isn't just a commodity.
There are just some religions that are less compatible with the modern world than others. Like religions that buy into a 5000 year old earth and others that assume no such thing. Do you think Geology is subject to our opinions?
When Religion causes people to wonder about things like 'Global Warming' it becomes dangerous because they do nothing about it. It's also dangerous when people are given misinformation, such as Evolution being incorrect. Pretty much everyone knows we all have different genetics and we pass our genetics down to our kids. If you have faulty genetics than guess what? Your particular combination of Genetics won't be in the future generations. Add in a few million years and you get differing species.