I would recommend using the SQL debug to see what SQL query is generated.
I would say that the second macro works because you are listing through the category object type which is getting the data from the CMS_Category DB table - so you can order them by those column names. But, when a category is assigned to a page, this information is stored in a binding table CMS_DocumentCategory - and as you can see, it does not have the CategoryOrder or CategoryParentID columns. This means, this information is not available with the current document.
To achieve your need I would recommend creating a custom macro. Then, in it's C# logic get the current document's categories and sort them and order them as you want by comparing it with the category object.