You remember wrongly. Bill Gates loaned Apple nothing! Instead, Microsoft, as part of a settlement of a patent infringement lawsuit brought against it by Apple, agreed to buy $150,000,000 of preferred, non-voting stock in Apple, license from Apple for five years for an undisclosed yearly royalty the disputed patents, commit to continue developing AND marketing Office for Mac for those same five years, and cede to Apple licenses to unnamed patents and copyrights for the life of each copyright and patent! In exchange, Apple agreed to drop the lawsuit, license the disputed patents, issue the preferred stock, and include Microsoft Explorer as a browser with Apple MacOS on all new Macs for five years as an optional installed browser along with Netscape Navigator! At the time of the settlement Apple was in the black, had had a profitable quarter, and had over $2 Billion in liquid assets and cash. Looking at the lopsided settlement, it's obvious who blinked in the lawsuit.
The Newton PDA could hardly be called a "miserable failure" as its product line contined for five years, produced seven Apple Newton models, and seven clone models from various manufacturers, only to be killed by Steve Jobs when he returned to the helm of Apple and wanted to streamline the company's focus.
There are many who still consider the iTunes line (on the Mac) and the iPods to be the best in each category. If you've never used an iPod touch, you don't know how good a player can be or how easy to use. Combine the Newton and the iPod and you get both the iPhone and the iPad. As for other "inferior hardware" many pundits and reviewers have claimed the best Windows machines they have used are Apple Macs booted into Windows or running Windows in a sandboxed virtual machine.
I use iTunes and I have multiple iPods, however iTunes still doesn't have some of the features of MusicMatch, which if you recall was bundled with the first iPods. The Creative Nomad was, at the time of iPod introduction, a superior product with an established market. It still lost to Apple.
I've used most major Operating systems in my more than 25 years in IT. I've gone through all of the mainframe/client/PC/Mac wars. The release of the iPod isn't ancient history to me. I've watched Apple go from a struggling computer company with a low market share grow into a money making machine (that still has low computer market share). I hope they continue to be a profitable company, but history shows that just because they are on top today (in their select markets) doesn't mean anything for tomorrow.