Wow! At first you might think that this is a mistake. My opinion is lower after a lot of analysis.
I tested all my testing in the developer version of SQL Server 2012. Release the query plan to school.
- Typical order: = sort operation
select * from TTest
order from TTest_Text desc;

- Code 1
DECLARE @sConcat nvarchar (max) = '';
SELECT @sConcat = @sConcat + '[' + D1.TTest_ID2 + ']'
FROM
(SELECT CAST (TTest_ID AS nvarchar (100)) AS TTest_ID2, TTest_Text FROM TTest) D1
ORDER BY D1.TTest_ID2;
PRINT @sConcat,

This creates a plan that looks right, but the wrong results.
- Code 2
DECLARE @sConcat nvarchar (max) = '';
SELECT @sConcat = @sConcat + '[' + CAST (D2.TTest_ID AS nvarchar (100)) + ']'
FROM (SELECT TTest_ID, TTest_Text FROM TTest) D2
ORDER BY D2.TTest_ID ASC,
PRINT @sConcat;

This creates a plan without sorting, the wrong plan, but the correct results.
I think you really need to think about a logical way to interpret the SQL query.
1 - FROM
2 - WHERE 3 - GROUP BY
4 - FIX
5 - SELECTION
6 - ORDER
Thus, a derived query is computed first. We cannot order an additional request due to the following restriction:
The ORDER BY clause is not valid in views, built-in functions, views, subqueries, and common table expressions unless TOP, OFFSET, or FOR XML is also specified.
You might think that (the query optimizer / transaction manager) computed a row and then noticed that it cannot be sorted because you have N rows, but 1 result.
In short, one would hope that both requests would either work correctly or fail. Since they do not receive the same plan, one request works and the other does not.