Everybody above in this thread of "Why Apple failed in the 90s" -- you're focusing on tiny facets of why they had so many problems, so let me tell you the true story.
As someone who was there, covering the whole Apple saga, going to the tradeshows, etc., etc., I can tell you what the problems really were.
1. Quixotic, inconstant leadership that didn't understand technology and also didn't have a vision. Nobody has run Apple better than Jobs 1.0, much less Jobs 2.0.
2. That lead to a lack of focus in the product arena, trying this, trying that, producing printers, scanners, way too many types of Mac, home gaming devices without a chance, trying to do everything at once. With so many failures, and products killed or abandoned left or right, the company had lots its spirit and so did the employees.
It's especially amazing to look at the Apple Design book, which has many photos of gorgeous and amazing prototypes from the design group made during the 90s, which of course never made it to the light of day. Except the TAM.
3. When all that scrabbling failed, the (silly) leadership decided that the reason Microsoft won was OS licensing. That may be strictly true, but Apple had always been built as a hardware company, and the attempted head transplant nearly killed it. (That's why the first thing Jobs did when he was back was to call in the Power Computing, etc., licensing deals.)
4. Entré doomed retail deals with sales channels that were more like shit channels. Seriously? BestBuy in the 90s? Bad idea.
5. And, of course, they had crap-all for a future OS roadmap. Copland was doomed and years late.
All of the above comes down to ignorant leadership. Scully, Amelio, they were all unfocused and impotent at best and deeply incompetent at worst.
When NeXT bought Apple for -$400 mil, and Jobs came back, grown up a lot as a human being, it was like when a missing parent shows up after a kid has been living on his own, building forts, skipping school, making a mess and eating ice cream all day.
At first, it seems terrible, but secretly the kid is relieved and glad that some discipline, somebody who knows better, has finally returned.
Jobs cleaned house. He tore down the forts and restored the living areas to a semblance of adulthood (bye bye Power Computing). He took away the ice cream (bye bye Newton, sniff). He made the employees go back to school… he's a demanding and exacting boss, with a clear vision, and not afraid to tell people when their work is not measuring up.
And Apple grew up.
End of story.
------
Did Apple lose developers to Windows? Extremely few. The people who were with Apple in the 90s were almost exclusively hardcore fans.
Did Apple not have as much software as Windows? Yes, but it was of higher quality; Windows has never had a shareware community (so willing to pay) like Macs have always had. There was a tight-knitness there that existed nowhere else.
Did they lose distribution of physical software packages in stores? Yes. See their retail woes above. This was a symptom, not a cause. Any retailer would be pissed that they were expected to carry 15 models of Mac that were practically indistinguishable from each other. A huge amount of Mac software was high-quality, professional shareware, downloaded or copied on floppy disks at Mac user groups.
Was trying to 'go mainstream' the problem? No, it was a tiny facet of the core issue -- worthless leadership.
-----
I also don't get why anyone would say "Why Apple failed in the 1990s" -- since it's still around, and has boatloads of cash, the core principles are still the same as they ever were. They were just buried for a while under fear.
Apple was never truly near death. You can't trust the news media and internet gossip, since they've been predicting Apple's death for 20 years.
Apple has always kept boatloads of cash on hand and its IP was extremely valuable. Throughout much of the 90s, its cash reserves were higher than its stock price * outstanding issues.
Apple could have chugged on for another decade with no problem.