It was inevitable in the sense the hardware was already available on the wholesale market. People tend to lionize these companies like they forged the phone out of the living earth themselves. Really they just contract with factories that assemble products out of components available on the wholesale market.
Sexy OS? You can argue that came mostly from within since that is how that software was developed, in house. But the hardware stack they ordered and had assembled for you? I’m not so sure.
Innovation is the introduction of a new paradigm that works so well that people can no longer imagine not having
No one was close to the original iPhone at launch and they didn’t really catch up until ~iPhone 12 for truly competitive alternatives