It's not immediately obvious because of our support for different providers. Take a look here:

https://github.com/danielgtaylor/boto/commit/43e58e581f6c736f1473b7e9174c8a008ee4a506#diff-784b08fec7a47364084701c19b6d55c0R78
and
https://github.com/danielgtaylor/boto/commit/43e58e581f6c736f1473b7e9174c8a008ee4a506#diff-784b08fec7a47364084701c19b6d55c0R256

If the env var is set then it pulls it into `profile_name` and uses it below.