I think that's definitely one aspect of it. I also think that the perceived universality and easy of use is another big driver with Apple. Although in reality, it's really easy to sync an Android phone's content with your PC, Chromecast, bluetooth devices, ect., Apple does a good job of making it seem as though using their products is the easiest way to live your life. You can get an Apple computer, an Apple phone, Apple headphones, Apple TV, ect. If you have one Apple product you can easily use any other Apple product with it.
PC's and Android have a reputation of requiring some fiddling. There's lots of different brands, different software, different standards. Some people can't be bothered. They rather pay more for a product that may technically be worse (although, like you say, they are still good products, just not so much relative to the price of the hardware within them). They know the tech support is friendly, ethusiastic, and reliable, which is good for anyone who is worried about their product not working. This all plays into the brand appeal, but I think Apple is successful for more than simply being, as you say, "cool".
That said, PC for life.