It depends.
Some actually believe it. I think the majority believe buying this stuff makes them superior to others. Or they have a complex and this compensates for a feeling of inferiority.
I think that's a bit unfair. I wonder if we have any psychologists in the house who could offer an explanation?
I think it only takes one person to try these products and report 'veils lifted' to create a 'Fear of missing out' that brings others on board.
Added to which a lot of people are dissatisfied with the sound they are getting, likely because they have cobbled their set-up together from reading subjective reviews and so there is no logic behind it and they do not have the knowledge to work out what the real issues are. A 'magic bullet' plug and play solution looks good to them.
Once they have bought the foo then it is difficult to report that it has not solved the problem as they will be accused of having poor hearing or an inferior system that does not reveal the difference. So they will say that the soundstage has widened, or that details they could not hear before are now apparent, whilst still being dissatisfied overall. This is an acceptable and credible position that will still be seen as a positive appraisal of the foo device.
This then encourages others to get on board. Does not matter if they do not have a problem to fix there is still the possibility of better sound quality.
Even very intelligent people do stupid things if they have moved into an area where they lack knowledge.