"ordering" means arranging things in order by some metric.
"sorting" means assigning things into bins (which are usually ordered).
This is news to me. Source?
"The children were sorted in to two lines by gender then ordered by height"
You might substitute "sorted by height" but its certainly not a correction. While "ordered into lines" would be an error.
The sorting office for a postal service.
What do you do when you sort your washing?