Apple may not always have the specs or work best with non-Apple services, but Apple products are consistently high quality, integrate nicely into Apple's ecosystem, and are brand that shows its owners are a certain type of class. Signifying you're of a certain type of class or are "hip" seems to be what so many tech people get hung up upon yet its basic consumerism.
Certain types of people wear Nike clothes or wear Ralph Lauren, or drive a Tesla. Showing you're a HENRY (High Earner; Not Rich Yet) is apart of Apple's appeal.
So no, people know there are Apple alternatives but they don't care because Apple has an appeal that other tech companies have trouble emulating on top of constantly being high quality products. There's almost no Apple product that is "bottom of the barrel" in terms of quality.
I do not personally prefer Apple cause it is not my cup of tea (and I need headphone jack) but they have been coming up with amazing phones year after year, and you can easily skip a year without it affecting your usage.
They cannot reinvent the wheel every time.
Apple don't make camera sensors, yet.
The problem is after other poor experiences I will only get a Google phone. The Pixel 3 XL with 128gb is $999. A new iPhone Xs is 1249 for the 256gb. Is taking yet another chance on Android worth $250? How well will that Pixel 3 XL even be supported?
It just isn't as simple as no one does any research.
I've made four attempts to consider an Android ecosystem and have owned the following:
Nexus 4, Nexus 5, Note 5, and Pixel 2XL.
The Nexus/Pixel phone hardware were fine, but I found that the software ecosystem was heavily lacking. I got the impression that to the majority of Android devs, UX was the last thing they cared about.
The Note 5 on the other hand was one of the most disrespectful, anti-consumer experiences I had ever encountered since ditching a dumbphone years ago. The carrier I used (Verizon) felt it was appropriate to plaster its own logo on the back of the phone and in a loading splash screen when powering on the phone, plus preload the phone with a bunch of useless apps that could not be uninstalled.
Every single time that I've purchased an Android device hoping that it was finally good enough, I've ended up carrying my iPhone as a secondary device within a week and either returning or throwing the Android device in the drawer within a month.