Libraries worth of consultant's reports have been written about Why People Buy, and mountains of money have been made by the few who know the answer. I suspect some of it is sympathetic magic.
If I buy a book about losing weight, I'll lose weight. If I buy the book and read it, I have an even better chance! Following the instructions and changing my diet is the final step which most of us never quite get to...
If I buy a big ol' macho truck, it'll make me hunky and virile. It costs more than going to the gym for two hours every day, but it requires a lot less will power.
And the old chestnut: if I buy that product that the film star uses, I'll be beautiful and rich, too.
I'm not sure sympathetic magic is, in fact, the right term. Buying something because its promise will rub off on me is not quite the "like affects like" principle of sympathetic magic, but it's close.
Even though few people practice it explicitly, sympathetic magic is everywhere in behavior and culture. It must be grounded in some hard-wired behavior. It's probably related to our skill in seeing patterns and making connections. Recognizing similarity helps animals get fed and laid; 'that looks like something that tasted good last time', 'that looks like my parent, so it's probably a decent mate'. Science and much of art is driven by the need to explain; and an explanation is just a plausible link between cause and effect. Combine the two, and one has a powerful mechanism: A caused B because A resembled B.
The magic of buying (with the aid of the Post Hoc and Wrong Direction fallacies) is "B talks about A, therefore B causes A".