That's not what materialism means in the context of communist theory.
When communists talk about materialism, we generally refer to historical materialism, the theory that a society's culture and politics (its superstructure) are shaped by its material forces (its base). This isn't strictly a one-way street, mind - it's cyclical, with each exerting some influence on the other, though the base dominates. See this diagram. This view is generally contrasted with liberal idealism, which assumes that ideas and culture are the dominant drivers of society.
To give an example in the most straightforward terms possible, let's take the question: "What is the connection between the 19th century US southern aristocrats' Christianity and their support for slavery?"
Idealism says that these aristocrats were pro-slavery because they interpreted the Bible to be pro-slavery.
Materialism says that these aristocrats interpreted the Bible to be pro-slavery because they were pro-slavery.
Ultimately, they were following their economic and material interests in a society in which Christianity was the dominant religion. Anything they may have believed or professed to believe about Christianity emerged from that.