GatherBy[{e1, e2, e3, ...}, f] evaluates f[ei] for each i to determine how to gather the ei.
GatherBy[list, ...] gives results that follow the ordering of elements in list.
Within each sublist generated by GatherBy[list, ...], elements appear in the same order as in list; the complete sublists are ordered so that their first elements appear in the same order as in list.