To be fair, derision toward the likes of Microsoft has historically been pretty well warranted. Windows has, historically, obviously, been plagued by viruses, malware, crapware, etc., to a degree far surpassing any other operating system.
That's not to say this necessarily has anything to do with proprietary versus open-source. Obviously Windows has always been far more popular than any alternative, making it a much more tempting target for attackers. High profile bugs like shellshock have certainly pointed out that open source isn't a magical elixir that wards off security problems.
Nobody does security very well, yet. (Well, maybe excepting folks like the CompCert people and Sel4 people.) The underlying causes, I'm sure, is that it's not what your average (or even above average) consumer can evaluate and value, and it's not what your average programmer can deliver.