It's not so different from other companies (e.g. on Android, Google used the Linux kernel, but replaced all other userspace components of the traditional GNU/Linux distro by non-copyleft versions, including developing their own libc).
I do this because I myself primarily buy Apple products for their software. It’s anecdotal of course, but I own a MacBook Pro because I like OS/X more than Linux, and, certainly more than Windows, not because it has a touchbar. Similarly I primarily own an iPhone because I much prefer iOS to Android. I also prefer iCloud services and iMessage to all their similar options. In fact my biggest grief with the iPhone isn’t the missing headphone jack or the ludicrous price tag, it’s that Siri is so much worse than the other voice assistants.
Maybe that’s just me, but I suspect I’m not alone, and that’s why I think their core problem is software rather than hardware.
But for the past decade, they haven’t really made any interesting software. iOS is great for iPhones, it’s not great for a laptop replacement. I think OS/x would be a much better fit for the iPad Pro, but perhaps something completely new would be even better? I think the surface book shows us just why that is by the way. If I didn’t personally find windows so terrible, I would leave Apple for one of those in a heartbeat.