The situation was slightly more complicated. Half of the original launch apps on the phone were first built as JS web apps. Most were completely rewritten to be native apps before launch (and the rest after launch) because it was clear that the native experience was superior.
Only later was the decision made to ship a public SDK. Web apps were announced because that's the only thing third parties could use. There was no public API to speak of, just a collection of internal APIs and one-offs in individual apps.