It's only working because temporarily OS on PCs blows.
Apple's only sustained income was always from professional/creative grade client, film and music industry. People who would buy tens of thousands worth of hardware every few years and prior to OS used other proprietary systems - be it SGIs, Sun, DEC and the closest they ever got to Windows was Intergraphs. Meanwhile, after Jobs revived and rescued their hardware, Apple somehow managed to do a full circle - to where they were before PowerPC demise - they officially and unofficially killed off pro/creative ranges and development, leaving domestic as the only market of interest and they already began dragging their feet in terms of hardware adaptation (their entire range, top to bottom, is at least 2 years old tech that's hugely overpriced for what it is).
And just like XP nearly killed off Apple back in the day, if the next Windows has that kind of instant mass-appeal and is attractive enough OS to live, game and work with, not just browse the net, the tide will turn. Inevitably. As it does cyclically, to every proprietary hardware and OS giant in history of technology.