What sorting does
The tool reads your text as a list of lines and reorders them in place. The original line contents are unchanged; only their sequence shifts. Sorting is stable in most implementations, meaning that lines considered equal keep their original relative order — useful when you sort by one criterion and plan to sort by another later.