Some text editors have a function for sorting text in-place. Vim does, and I assume Emacs does too.
Sorting makes it easier to recognize a common grouping of imports (e.g. some recurring functionality that requires three particular modules) without inspecting the words carefully.