For the first year, Scott Forstall, the Senior Vice President in charge of the iPhone's software, very directly encouraged companies like Pandora[0] to jailbreak iPhones in order to get a head start on app development, protected that community from Steve Jobs' ire, and then used the existence and popularity of jailbreaking to convince Steve that a sandboxed app store would be a better idea than Apple writing every single app for the iPhone[1].
Once native APIs were available, that was true, but before it was even clear that the iPhone would have an app store, they very much did let it flourish.
[0]: https://www.macrumors.com/2021/03/03/scott-forstall-pandora-...
[1]: https://mjtsai.com/blog/2026/04/06/apple-creating-all-the-ap...