Question / Confusion re: Variables

Hey – was hoping somebody could explain to me what is going on here.

group_vars/all:

db_name: top_level_db

roles/role_name/vars/main.yml:

db_name: role_level_db
db_name_test: “{{db_name}}”

env:
DB_NAME: “{{db_name}}”

When I run code in roles/role_name/tasks/main.yml, when I try to use the variables, I see that db_name_test is as I expect (it returns the value role_level_db), but the env.DB_NAME value is surprising to me (it shows top_level_db)

Any comments/clarification are appreciated!

Thanks

Brian