Religion has its place as a ladder between barbarism and the first rung of civilization. Once you reach competence you have to throw the ladder away because it becomes a burden and a useless vestigial obstacle, but the ladder is still needed by the billions on the bottom who can't jump to the first rung.
Religion is the survey course in becoming human. Science is the graduate course. But most people need to take the survey course first -- only maybe 10% of the population places out of it.