This worked fine for decades and the sky hasn't fallen yet. Being able to run "random malicious installers" as you call it was what made Windows successful in the first place and how it stays relevant today.
It does work for Windows, but the expectations are different there. I think being able to buy a completely open device and also buy a completely closed device is a good thing. I don't want every device to be locked down, but I'm okay with my iPhone being a console-like "it just works" device. The difficulty of screwing up an iOS device is a feature, in my opinion.
It's the same thing with my Switch, Xbox, 3DS, whatever. They all keep working well over time because apps are limited in what they can do, and they are curated.
Meanwhile, because on Windows and macOS you aren't limited to their respective app stores, the app stores don't have as complete a selection as their locked-down counterparts, meaning you have to go outside the store to get everything you need. Consequently, a Windows computer gets slower over time, and you're never sure if you've completely uninstalled something, unless you use one of the now numerous 500MB+ launchers/updaters. MacOS is marginally better, but I still have to go and clean out LaunchAgents and LaunchDaemons, and wonder if it's the Razer kext causing kernel panics because it was cheaper for them to make one than build everything necessary into the mouse. On both OSs, it's extremely nontrivial to figure out if some software is causing the device to wake from sleep and drain the battery. The consequence of allowing application developers to do anything is that they will do everything, and it's very hard as an OS developer to keep all the user software well-behaved.
It's the same thing with my Switch, Xbox, 3DS, whatever. They all keep working well over time because apps are limited in what they can do, and they are curated.
Meanwhile, because on Windows and macOS you aren't limited to their respective app stores, the app stores don't have as complete a selection as their locked-down counterparts, meaning you have to go outside the store to get everything you need. Consequently, a Windows computer gets slower over time, and you're never sure if you've completely uninstalled something, unless you use one of the now numerous 500MB+ launchers/updaters. MacOS is marginally better, but I still have to go and clean out LaunchAgents and LaunchDaemons, and wonder if it's the Razer kext causing kernel panics because it was cheaper for them to make one than build everything necessary into the mouse. On both OSs, it's extremely nontrivial to figure out if some software is causing the device to wake from sleep and drain the battery. The consequence of allowing application developers to do anything is that they will do everything, and it's very hard as an OS developer to keep all the user software well-behaved.