> Apple has had better mobile hardware for years
Apple has never had better hardware (on mobile). Apple has had better software support & integration for their hardware that has lead to e.g. strong camera quality advantages (iOS camera app has been able to use the hardware better to produce photos people want despite some Android OEMs having objectively better camera modules since those OEMs have to work through a lot of Google contracts & software extraction).
The hardware has never been better - their holistic ecosystem has just made integrations with it smoother.
> Apple has better app selection (for most people)
This has been true but it's always been marginal, & the "for most people" qualifier has contracted significantly in recent years. Both Google's & Apple's 1P offerings have declined in quality & popularity, but Google have increased lock-in & reliance on theirs in ways Apple can't, while the 3P offerings on Android have improved significantly relative to iOS. Gone are the days of companies releasing exclusively on iOS, or the Android version being an afterthought with missing features - if anything it's swung in the other direction.
To be clear, I think your points still stand: Google's recent strategy doesn't make sense for Google. I just don't think it's as glaringly clear cut as you make out.
One aspect that's worth keeping in mind is the non-US market. Apple has a 58% market share in the US but it's 28% worldwide. Outside of the US market the impact of that "every Android user lost to the increasing iOS market share" is significantly diluted (tbh I'm not sure it's even increasing outside of the US at all) & emerging markets are growth areas.