Using a Sorter stage before an Aggregator groups identical keys together, significantly improving aggregation performance. When data is sorted by the key columns, the Aggregator can operate in sorted mode which is much more efficient than unsorted mode.