Setting aside the object of religious worship for a moment, purely from a secular view Daniel Dennett's book "Breaking the Spell: Religion as a Natural Phenomenon" goes into many ways in which religion was an positively adaptive force that shaped the development of humanity, leading it from a tribal nature (that could be extended to the country level) to one where larger groups that share common beliefs (like Democracy I guess) can coexist with lesser friction. So even without a god, religion was an important stepping stone to get us to today, which implies neither that it is still needed anymore nor that it is not so needed, nor that something better might not exist but it does say how that route in particular was what WAS used bc it WORKED.
But like anything, let's say a gun, the proper use is one thing while improper use is another, and it can be dangerous if misused. Probably talking on social media is even one of these things (it can get addictive and therefore become maladaptive)! People who hold a gun should be aware of its potential for misuse, not just to oneself but to those around them as well, and those who are not aware are unfit to hold it, while those who are aware yet do not care are absolute jerks. And similarly with religion. And yes, as you pointed out, similarly with atheism/agnosticism/apatheism (a newer word meaning those who simply DGAF one way or another), as changes intended to have been made for the better end up missing a few pieces.
I am not arguing for any religion or lack thereof in particular, simply saying that those who don't know their history... well you know the thing:-D.