An index sorted on a column can satisfy an ORDER BY on that same column without a separate sort step — the engine simply walks the already-sorted leaf nodes in order, instead of retrieving rows and sorting them afterward:
CREATE INDEX idx_salary ON Employees (salary);
SELECT * FROM Employees ORDER BY salary;
-- Can potentially walk idx_salary's leaves directly, avoiding a separate sort
The same idea extends to GROUP BY on some engines, since grouping benefits from having same-valued rows already adjacent to each other. A composite index's column order matters here too: an index on (dept, salary) can satisfy ORDER BY dept, salary directly, but not ORDER BY salary, dept — the physical order in the index only matches one of those two orderings.
This is a genuinely different reason to add an index than "speed up a WHERE filter" — an index purely to avoid a sort on a large result set (e.g., a paginated listing endpoint that always sorts the same way) can be worth adding even on a column that isn't especially selective.