There can be many reasons, and I can only speak for myself.
In my earlier car-owning years, I never bought the same brand of car twice, and I essentially had no brand loyalty. My earlier cars included the following:
'71 Dodge Charger SE
'71 VW Karmann Ghia (the only one bought as a used car)
'74 Volvo 240 GL
'81 Chevy Citation
'86 Ford Taurus
'92 Honda Accord wagon
The Dodge, the VW, the Taurus, and the Honda were all acceptably reliable, and only needed occasional, minor repairs. In other words, not perfect, but decent cars. The Volvo was the absolute worst, unmitigated
POS that you could possibly imagine, and the only reason that I kept it for 7 years was that I was not financially able to replace it for several years. The Citation was very problem-prone, and it spent a lot of time in the shop, but--believe it or not--it was much more reliable than that POS Volvo.
In 1996, I moved to a rural area with roads that were not always plowed promptly in winter, and I felt the need for AWD. Because there was a Subaru dealer only a few miles from my house, I test-drove an Outback, and liked this model enough to buy one--a '97 model.
Well, that '97 Outback proved to be the most reliable car that I had ever owned. Despite Honda's stellar reputation, that Subaru's reliability and freedom from repairs was even better than my Honda Accord. Also--that local Subaru dealership treated me better than I had ever been treated by any car dealership. To say that they treated me like royalty would not be too much of an exaggeration.
When I felt the urge for a new car in 2001, I test drove a few models, but the new six-cylinder Outback seemed better to me than the other models that I test drove. So, I bought a 2002 Outback H-6 VDC from that same local dealership. This '02 Outback proved to be absolutely bullet-proof, and this led me to have some brand loyalty to Subaru. Also--the dealership continued to treat me very, very well.
So--when I again got the urge for a new car in 2010, I test-drove a few other makes, but again I felt that a six-cylinder Outback gave me a better, more satisfying car for the money than the competition did. And so, I bought my present car, a 2011 Outback 3.6R Limited--from the same family that runs the local Subie dealership. As they had with the 2 previous cars, they beat the price of other, more distant, Subaru dealers by a couple of hundred $$
Do I have brand loyalty, or do I have dealership loyalty?
I guess that it is a little of both.
If I continue to like the way that a particular make of car performs and if I find it to be a better value than its competition, I guess that equates somewhat to brand loyalty.
If I continue to like the way that I (and my car) are treated by a particular dealership, I guess that equates to dealership loyalty.
In my case, both situations apply.