They’ve had over a decade to create an ecosystem that people are willing to actually spend money on. But statistically, people who are willing to spend money on a high end phone, a watch, $160+ headphones, etc veer toward Apple.
Google has been selling its own branded phones and tablets for six or seven years unsuccessfully.
The Pixel 3a seems to have been relatively successful.
https://ww.9to5google.com/2019/08/20/report-google-sees-near...
And while Pixel vs. iPhone is not the same discussion as iOS vs Android, it's worth mentioning Android has grown over the past several years whereas iOS has largely stalled.
https://gs.statcounter.com/os-market-share/mobile/worldwide/...
But Apple also realizes that iPhone sells are stagnating. But at the same time they have auxiliary products that are all making revenues and profits that any of the Android makers would die for from watches, AirPods, and services.
Considering Google paid Apple 12 billion dollars this year to be the default search engine on iOS [0], they have a very big incentive to build a high quality android phone to get iOS users to switch over.
Those 3 or 4 million pixels could have been iOS users as I was one of those people last year when I decided to try out android again and the pixel was the first android I have ever used that didn't suck compared to my iphones (looking at you samsung galaxy s4). With apples draconian enforcement of what I can run on my iOS devices and set as defaults, I think I'll even stick to android unless it goes to shit or apple makes something radically better.
[0]: https://fortune.com/2018/09/29/google-apple-safari-search-en...