One common use case with a third-party library is for deep linking [1]. The deep link is copied with javascript in the browser, then after installing the app it can open right to where you were on the web.
[1] https://github.com/firebase/firebase-ios-sdk/blob/c8625ec52e...