Because they don’t really understand what religion is.
Materialists misrepresent religion as being ‘only’ belief. They then go further and imagine things about that belief they they believe are universal to that religion but really are only true for a very small number of actual believers in religion.
It’s silly, but materialism can’t help but be anything but.