Nah, it works because our understanding of human psychology is real, and lots of people are susceptible to the messaging of advertising.
Propaganda (what advertising is at its core) still works under communism, it doesn’t suddenly stop working because capitalism no longer exists. If that was true, images like the one below wouldn’t have needed to exist to help promote the communist message. (Propaganda isn’t always inherently evil, sometimes it’s purpose is to help spread a political message that can be positive.)
I agree, marketing serves no fundamental purpose for society, because it’s essentially just lies to sell a product or service. However I vehemently disagree it only works because of capitalism.