I mean I'm just speaking from my own anecdotal experience and others could be different, however I've noticed that Android users tend to be more vocal about 'iSheeps' and are a bit like preachy vegans in the sense they try to force their opinion down your throats. In my experience, iPhone users don't feel as passionate as Android users do that their phones are better. (Although when I had a Samsung, I've had my iPhone mates light heartedly take the mick out of the quality of my snaps on snapchat, but that's about it). I had the iPhone 5c before the S7 edge, and when I switched to the latter, my iPhone friends didn't bat an eyelid. However when I got the iPhone 8, most Android people I know literally had their pitchforks and torches out! It was crazy how passionate they were.
Yes I've heard the rather awfully classist argument iPhone users make that Android users are poor and it really annoys me: I don't have a lot of money either, which is exactly the reason why I didn't get the XS. I don't even really have the money for an XR either, so I got a refurbished iPhone 8 for £410 which I could just about afford and even that was quite expensive (I actually think refurbished market is the way to go, but thats a discussion for another thread). But if I had even less to spend, I would have gone for an older gen iPhone.
More people worldwide do have Androids than iPhones, but that's accounting for people in developing countries that won't have a lot of money or privileges that we take for granted. And those people won't have a Samsung S series either - they will have a cheap crappy £150 moto g phone or some sort, not because they think it's better than an iPhone but because it's really their only choice with the money they've got. It's really a case of class/economic divide than choice.
When it comes to the western world, you will find that more people if not just as many have iPhones, but I don't have the statistics, so I could be wrong though I find it hard to believe that significantly more Britons or people from western countries have iPhones than Androids.
I mean it takes two seconds to open the calendar app to look at your daily schedule. But iOS now have widgets so you can put your calendar there, so yeah. Maybe it's not gimmicky to have widgets or customise your phone a little bit to an extent but some people take it a step further and download custom UIs to drastically change the appearance of their phone. And it's always the tech geeks that give a crap about stuff like this to that extent. They also talk about things like custom ROMs (I don't know what that is, but it doesn't sound like something the average user would be interested in) but they don't acknowledge no one except them cares about things like that. I can't think of a single 3rd party app apart from Showbox that people actually use, and it only makes them more vulnerable to viruses too. And like I said earlier, if people aren't looking at Androids for gimmicks, it's because they're short on money, or maybe they prefer the experience of Android - and it's usually Samsungs they prefer. Who in their right mind would switch from an iPhone XS Max to a crappy moto g phone just because of the OS?
I mean yeah okay fair enough I can't argue with that [referring to your thing about hardware/software optimisation].
Like I said initially, I acknowledge that difference in user experience and fluidity, performance etc. are marginally and barely noticeable, but they were noticeable to me and will be to a lot of people. And yeah battery life on iPhones are utter ****e compared to Samsungs I'm not gonna lie, but it's a compromise I'm personally willing to make taking everything else into consideration.
Android phones tend to be of a marginally lower quality to accommodate for flexibility in their software, like you said yourself earlier re hardware optimisation. The quantity of features tend to be a win for a lot of people who want an Android. The cheapness of some devices are a win as well. (Though you can get an older gen iPhone refurbished for cheap).
A lot of people do blindly buy Apple stuff because of the name, I won't deny that. But it's a household name for a reason, not just for the sake of it. On the Android side, people are also guilty of this, because I know a lot of people (including myself) who, if they get an Android, will only the Samsung S series and nothing else, simply because of the name. There are phones like the OnePlus 6 or something that are like £400 and even though they're just as good as Samsungs, even I wouldn't get it on the slim chance I convert back to Android, simply because I am snobbish about the name.