The inline view or query is a separate entity which is returning only the results to the main query. Common practice is to give them aliases and this would also help to understand the situation.
Consider the following example where you see how only results are returned and renamed
select *
from (select s.name as col1,
s.age as col2,
s.number as col3
from Student s) subq
order by subq.Col1;