
A lot of reasons. First of all, it’s not really their goal to make a good OS for users. They know that 95% will use windows no matter what, especially businesses, because they still more or less have a monopoly, especially in the desktop market.
In other words, any ressources spent on improving the desktop OS experience past the bare minimum is excess because they don’t really get anything concrete in return.
Yes, windows is less efficient than other os, but until recently, this wasn’t a problem for microsoft since you can just throw more/better hardware at the issue, which is a win win. They have to spend less ressources at optimizing code for better performance and, I imagine, they get a better cut since their hardware partners sell more devices because hardware gets obsoete every couple of years.
And in the server environment, they want it to be increasingly expensive because windows server is mostly used in cases where there is no alternative, and they want it all in their cloud.
Also, a lot of what is annoying about windows is per design. Ads, sponsorship ads, forced accounts, etc.

When I first went to the US, the unrealistically low speed limits were one of the first things I noticed when driving.
I kinda assumed that this is by design so that police can pull over anyone they feel like since virtually everyone drives over the speed limit in some areas as it is so ridiculously low.