The general policy for environment variables is to provide configuration inputs, similar to command-line options and arguments. For the most part, we use environment variables for settings that rarely change. We'll often set them via the .bashrc or .bash_profile files so that the values are set every time we log in. We may set the environment variables more globally in an /etc/bashrc file so that they apply to all users. We can also set environment variables on the command line, but these settings only apply to the program being run.
In some cases, all of our configuration settings can be provided on the command line. In this case, the environment variables could be used as a kind of backup syntax for slowly changing variables.
In other cases, the configuration values providing environment variables may be disconnected...