In this particular instance ssh-import-id retrieves an SSH key from GitHub for you. The tool can import from both GitHub and Launchpad. Normally the tool takes the retrieved key and adds it to your authorized keys file which is what Ubuntu Server would have been doing. The manual page outlines the mechanics of the specific API calls it makes to retrieve the key.
will retrieve the public keys uploaded for the given username. Both github and gitlab work.
In this particular instance ssh-import-id retrieves an SSH key from GitHub for you. The tool can import from both GitHub and Launchpad. Normally the tool takes the retrieved key and adds it to your authorized keys file which is what Ubuntu Server would have been doing. The manual page outlines the mechanics of the specific API calls it makes to retrieve the key.
In addition to Rinzwind's answer, Github has an API for this.
The API is not the URL described by Rinzwind, but it appears to be in addition to that.
The exact usage is
ssh-import-id gh:github_username
See the manpages