When a build creates an artifact, it would often be useful if it can easily announce it for people to view or download, especially since there is no persistent URL we can give people that will always fetch the artifact from the latest successful build of a project.
Yes, you can get it with the API as described at https://circleci.com/docs/api/#artifacts . But it’s making a call to the API is relatively complicated and requires a token. Reading an environment variable would be much simpler.