Security is rather hard to do when the whole basis for the OS is a mess. Bits have been piled on, changed and left there since Windows 95 or before. Much of the OS seems to be there to stop you doing things unless you bought the right licence, rather than stop you doing things because you don't have permissions. And now they're concentrating on adverts and conversions.
Perhaps if they took teams off the crapware and onto security, and had somebody in charge who had the ethos of "get people to use windows BECAUSE of its features" and not "IN SPITE OF its features" we'd have a secure and well-like system.