Apple's motives are easy to understand over the macOS -> iOS arc, as Apple is now a mobile company that happens to make computers. The A-series -> M-series chips are stunning proof of that.
But I digress.
When Apple was a niche PC maker, it needed the web as a way to help potential customers de-risk the purchase of luxury computers. While it enjoyed outsized influence, the Mac never had enough share to create a sufficiently large software ecosystem w/o the web.
/cc @chriscoyier @tomayac
In this era (~'98-'12), the web provided a bridge over a moat formed by a competitor's proprietary stack winning through momentum and network effects. The web went "over the top" of both Macs and PCs, and while Apple desperately coveted native app builders for the Mac, was at least savvy enough to know that if it could add the universe of great web apps to the Mac experience, it would be a market-reality help at point of sale.
/cc @chriscoyier @tomayac