It's standard OIDC stuff. The way it works is:
* user visits app (first page view)
* app is redirected to Keycloak login page
* user is redirected back to app page (second page view)
Further the javascript adapter assumes the app is a single-page app so it doesn't store the tokens so the above flow is repeated for each request even if the user is already authenticated. You can bypass that if you want by manually storing the tokens in html5 storage and init the javascript adapter with it (see the docs for that). Be aware that's a slight security risk as you're storing the tokens which could potentially be leaked.