That is what drove me away. I assume this is still true, and my iOS devices will receive software updates for longer than Android devices.
Granted, most people would not be able to discern security updates and software updates or maybe even care about them nowadays, but back when the ecosystems and reputations were being established in early 2010s, Android vendors really dropped the ball. Everyone could see their relatives continuing to use iPhone 4 and iPhone 5 a couple more years and getting visibly updated for a couple more years than competing Androids (even from Google themselves!).
The resell value of iPhones was more as well, and I assume many or most people figured out that the probability of iOS devices outlasting competing Android devices was high.
Apple also managed to cause lasting damage to HTC as a brand when they ventured into the US. I don't HTC ever recovered from that, although it might not have been the only problem they had.
[1] https://morningconsult.com/opinions/apple-v-samsung-scotus-s...