BUG: groupby reorders categorical categories
Ref: #48749

- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

~Still needs more tests and a whatsnew~
@mroeschke - this doesn't tackle the performance aspect of #48749, only the behavior. It's not clear to me but it seems possible there is still something that can be done in regards to performance, so I think we should leave #48749 open for now. > I think we should leave https://github.com/pandas-dev/pandas/issues/48749 open for now.

Agreed

Also looks like a ASV benchmark needs addressing: https://github.com/pandas-dev/pandas/actions/runs/3261927947/jobs/5357896059 Regarding the failing ASV, not sure how to approach here. ~I can't reproduce locally~ with `asv continuous -f 1.1 upstream/main HEAD --quick` and the log doesn't give any indication of what's failing.

Edit: I can reproduce locally, I just missed it in the output:

```
       before           after         ratio
     [aa051b8f]       [1bde9f0f]
     <main>           <groupby_cat_order>
!     1.08±0.02ms           failed      n/a  groupby.Categories.time_groupby_extra_cat_nosort
``` ASVs in groupby:

```
       before           after         ratio
     [890d0975]       [8166c13b]
     <groupby_cat_order~2^2>       <groupby_cat_order>
+         258±4μs      1.31±0.01ms     5.08  groupby.Categories.time_groupby_extra_cat_sort
+       271±0.5μs      1.35±0.01ms     4.98  groupby.Categories.time_groupby_ordered_sort
+       270±0.8μs      1.34±0.01ms     4.97  groupby.Categories.time_groupby_sort
+     1.08±0.02ms      2.34±0.01ms     2.18  groupby.Categories.time_groupby_extra_cat_nosort
+     1.27±0.01ms      2.50±0.01ms     1.97  groupby.Categories.time_groupby_nosort
+     1.44±0.01ms      2.50±0.07ms     1.73  groupby.Categories.time_groupby_ordered_nosort
+         105±5μs          118±2μs     1.12  groupby.GroupByMethods.time_dtype_as_field('int16', 'quantile', 'direct', 1)
-      12.0±0.1ms       10.8±0.3ms     0.90  groupby.AggEngine.time_dataframe_cython(True)
```

These benchmarks use data with length 100000 and 10000 categories. Awesome, thanks @rhshadrach 