SELECT statement precedence (Query vs. Sub-Query)

Hi everyone I am wondering if someone can help me understand why the Sub-Query's SELECT statement ended up producing the column name 'Code' vs. the initial SELECT statment call 'local_name' in the below screenshot Thanks in advance!

Query_SUB_QUERY_question_.png