Aren't many of these protections at the OS level? Certainly apps installed from 3rd party App stores on Android still have to use the same permissions system/etc as those coming from the Google Store.
For example straight up fraud and phishing, or botnets, or Apps that abuse permissions.
Many of these have no technical countermeasures and have to either be rejected at review time, or removed when discovered.
Far more could be done with more sophisticated user controlled monitoring tools, which could say monitor the network traffic, application accesses to any information on the device etc. No reason it cannot be done, and they may be there already.
Also device does not need to have their applications mandatorily locked to an App Store to get the benefits. Optional use of the 'official' app store is fine too, which is what isn't there on iOS. You can choose to just get your applications through the 'official' app store. Someone else not getting their applications through the 'official' app store does not magically put those applications on your device, and thus does not decrease the security you may get from the app store for you.
As as for ‘you can just choose the official store’ - it’s not as simple as that. There will be a giant campaign to get people to install alternative stores because the official one is evil and locked down.
People will do so without having the ability to tell which alternative stores are legitimate and which are not.
Until very recently (ios 13/14) apps did exactly this. There are arguments for the walled garden in terms of ensuring applications are built, signed, and distributed safely but developers (e.g. Facebook, etc) absolutely abused the system APIs to spy on users and collect data they had no right to.
Even with the newer protections, apps randomly want to access my contacts or local network or location. The average user (like my mom and dad) are most likely just gonna click through those.
I'm not arguing for ios/android here but we should be factual. I will say I like the walled garden for other reasons, such as a consistent payment gateway, etc.