Functionally, regardless of whether the religion in question is true, it will solve issues that humans face. Namely:
(1) Creating an untouchable, unseeable leader who can never be caught in a scandal, contradiction or anything untoward (something that humans will never be able to rectify if they themselves are leaders, due to their imperfection).
(2) Adds mystical magic to morality so that it seems divine, rather than just an impulse. This is especially important for cause-driven people who want to feel like they are living with a real purpose. It also helps to prevent crimes of all natures.
(3) Quells fear of the unknown with answers to queries that scare humans (e.g. what happens after death? You go to Heaven or hell; you are reincarnated; you enter paradise etc.).
(4) Creates free labor as a religious zealot will gladly do things in the name of the divine, all the whilst making them feel good for doing so.
Without religion, there are important holes to fill, and I don't think Atheism or Agnosticism fill them. I think it could be said that humans currently need religion to function.