Religion acts as a mechanism for perpetuating and giving social acceptability to certain kinds of bigotry. If it didn’t exist, it’d be much more difficult to justify that kind of bigotry.
In fact, in the absence of religion, the hole is filled with political power.
There is no void. If you leave a void, someone will fill it, after all. Bc there will still be social organization among us.