So this can remove the need to use a web browser for authentication of Google API calls?
An alternative system, might open the authentication phase in a mobile app or a biometric input, etc... The application at the end of the url will be deciding how to do that.
The reason for the whole thing is that we want to separate the area in which needs protection (authorization) and the area which does the authentication and can sit at a trusted site and may supply services to several resource servers.
You can play with such an implementation with an open source keycloak server. It really clearly reveals how the whole thing works.
> Note: To make browser flows work add http://localhost:9876/callback as a redirect URL to your client.