So I just googled "study of apple marketing" and nothing on the first couple of pages shows me any sort of statistically significant study indicating why people who chose to buy Apple products did so. I did see a lot of "case studies" and glorified opinion pieces.
If we were going to accept anecdotal evidence, I could tell you that none of the many developers I know who have switched from Windows to Mac in the past couple of years give a shit about brand - they just want to get their work done in the easiest way possible - for them that turned out to be a mac.
Of course, we would both be idiots to assume that our personal group of acquaintances were representative of the many millions of people who buy Apple products every year.
I do agree that marketing can be quite powerful. I also agree that there are probably people out there buying Apple products just for the brand. However, I think you're crazy if you think that the vast majority of Apple customers are buying Apple just for the brand, regardless of any advantage in hardware or software quality.
Marketing can guarantee a strong opening weekend for a shitty movie, but once people figure out that it sucks the attendance drops dramatically. People would not continue to pay a premium for products costing multiple hundreds of dollars if the quality wasn't there.
If I had to guess, I'd suggest that people are continuing to buy Apple products because they consistently boast the highest customer satisfaction rates in both computers and cell phones, and nothing sells products like positive word of mouth:
http://www.businessweek.com/technology/ByteOfTheApple/blog/archives/2008/08/mac_customer_sa.html
http://brainstormtech.blogs.fortune.cnn.com/2009/08/14/iphone-vs-pre-satisfaction-bakeoff/
So in the absence of any real evidence, we both have our theories. I just happen to think it's a lot more likely that people are rationally choosing superior products based on positive word of mouth than it is that people are irrationally spending lots of extra money because of some commercials they saw on TV.