Most materialists are such because they also embrace atheism (or philosophical naturalism) - the view, essentially, that nature is all there is - and they believe that atheism is most compatible with materialism.
One very perplexing difficulty with materialism, however, is posed by human consciousness. To simplify, when we have the experience of seeing the color red it's hard to explain how this phenomenon can be reduced to the material atoms and nerve fibers in the brain. There's nothing about atoms that can give rise to a sensation.
Sensations, or what's called phenomenal experience, seem to be both immaterial and inexplicable in terms of the material processes of the brain.
As Dutch philosopher and computer scientist Bernardo Kastrup writes:
Phenomenal consciousness is seen as one of the top unsolved problems in science. Nothing we can — or, arguably, even could — observe about the arrangement of atoms constituting the brain allows us to deduce what it feels like to smell an orange, fall in love, or have a belly ache.There's a vast gap between what we know about matter and what we experience when we see red, or feel pain or taste sugar. So, how does a materialist handle the difficulty? Kastrup explains:
Remarkably, the intractability of the problem has led some to even claim that consciousness doesn’t exist at all: Daniel Dennett and his followers famously argue that it is an illusion, whereas neuroscientist Michael Graziano proclaims that “consciousness doesn’t happen. It is a mistaken construct.” Really?Kastrup struggles to understand why someone would deny that they're really conscious:
The denial of phenomenal consciousness is called — depending on its particular formulation — ‘eliminativism’ or ‘illusionism.’
[W]hat kind of conscious inner dialogue do these people engage in so as to convince themselves that they have no conscious inner dialogue? Short of assuming that they are insane, fantastically stupid or dishonest — none of which is plausible — we have an authentic and rather baffling mystery in our hands.So, the materialist seeks to explain conscious experiences like seeing color, hearing music, smelling perfume, feeling pain, etc. either by denying that consciousness exists (eliminativism) or declaring them to be illusions (illusionism).
Kastrup examines the arguments for these ideas in his article to which the interested reader is referred, but I think there's at least a partial answer to Kastrup's "baffling mystery" that we can mention here.
Perhaps otherwise sensible people deny that they're conscious for the same reason that some embrace the strange idea of a multiverse. If we really do have a conscious mind that's not reducible to the material brain or if this exquisitely fine-tuned universe in which we live is the only one which exists, then the likelihood that materialism is wrong increases dramatically.
And if materialism turns out to be wrong then a major metaphysical prop holding up atheistic naturalism collapses. That's an outcome that must be avoided at all costs, even at the cost of denying that human beings are actually conscious.