Religion is not an opiate. Religion is more like a type of nutrition. Humans have a basic need to have an identity; a set of beliefs about who they are, why their lives are important, and how they fit in with the rest of the world.
These beliefs are important, but they are by nature superstitions. There is no factual basis for these beliefs. The universe doesn't particularly give any importance to human life, and yet we all need to believe that they do.
Atheists have ditched gods, but they haven't ditched superstition nor have they ditched the idea that some parts of human existence are sacred. We as human beings need these beliefs. Some of us believe in deities. Others believe in justice, or human rights, or equality or the dignity of life or whatever other ideals we have invented out of thin air to justify our existence.
A sense of meaning is a basic human need. The Universe doesn't provide us with any meaning, so we invent our own and pretend it is truth. Religion is as good as any other source of meaning.