Except that many computers didn't use CP/M as their operating systems in the 1970s. It was disk-based and few small boxes has disks of any sort. IIRC, it was written for Zilog Z80-based machines (or Intel's 8080 predecessor), and other CPUs were available then, as now.
The biggest problem with Windows has always been that it is proprietary. In proprietary operating systems, security issues always face those discovering them with a dilemma: do you announce to the world that your product has big problems (and face business-destroying lawsuits, etc.), or do you downplay and conceal? Your source code is a business asset and needs to remain secret, and, paradoxically, that isn't good for security either.
The most secure stuff is either open source (where thousands of people can pick over the code looking for issues), or military grade projects, where exhaustive testing is done, and systems generally isolated from the internet, etc.
The second biggest problem with Windows is the choice of security model. When NT came out I remember being surprised at how 'upside down' their security model seemed to be, compared to Unixes and Novell, which were quite similar conceptually.
Also, giving tyro owners root/superuser/administrator privileges and not guiding them to make a new system more secure was asking for trouble in the mass market, even on standalone machines, and sure enough...
UNIX started from a far better security model, which is one big reason why its concepts now dominate operating systems worldwide. The remaining big system vendors, Apple, Android, and Linux systems are all using variants of UNIX, and out of sight it's embedded in many different sorts of technology, such as routers, smart TVs and even cars. For decades Windows systems dominated the small computer market, but now mobile devices dominate new platform sales, that's not at all the case any more.