The answer is that identity is a primary human motivation. One of the major components of self-identity is group affiliation. People want to belong to a group that immediately identifies them as being superior to other people in other groups. That's just how human beings are wired. It's the same aspect of human nature that drives all fandom as well as nationalism and religious zealotry.
Buying a laptop, media player or cell phone is more like buying clothes or a car than buying a dishwasher or a vacuum cleaner. It's less about functionality and more about what it tells other people about who you are and what group you belong to.
This is what's so great about Apple: Its products get a "B" on features and functionality -- they're almost best in class in most of their respective categories. But they're an "A+" on what really matters -- coolness, which translates into both boosted self-identity and appealing group affiliation.
I'll get slammed on this last point by readers who hold features and functionality above self-identity. And I'll also get slammed by Apple fans who believe their product choices are driven by more substantive concerns than boosting their self-image.
But Apple executives will read this rule and say, "Well, yeah. Obviously." That's why their "Choose a Mac" ads are so effective. They're fun and highlight actual product differences between PCs running Windows and Macs. But they also clearly emphasize the idea that PC and Mac users are different kinds of people. Your choice is really about what kind of person you want to be or which group you want to belong to.
Most surviving consumer electronics companies know and use at least one of these secrets. But Apple is the only major company I can think of that employs all of them. And that's why Apple is No. 1.