BUG: `GroupBy.quantile` implicitly sorts `index.levels`
- [x] Closes #53009
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit)
- [x] Added an entry in the latest `doc/source/whatsnew/v2.1.0.rst` file

Hi @rhshadrach, thanks for your review! I've updated the changelog and the tests as you suggested. However, I'm not sure if `index.levels` is being compared. I tried using
```python
qind = pd.MultiIndex(
    [["A", "B"], [0.2, 0.8]],
    [[1, 1, 0, 0], [0, 1, 0, 1]],
    names=["cat1", None],
)
```
and it still passed the test. Is there any recommended way of fixing this? Thanks for identifying this @Charlie-XIAO - I opened #53095. For this PR, I think it'd be good to keep the assert_series_equal, and assert the index levels as you had it. Thanks @rhshadrach! I've retrieved the index levels check. Thanks for your review @rhshadrach! I've pushed the changes that avoid performance regression when `idx` is not `MultiIndex` as you suggested. Please let me know if similar changes should apply to the case when `idx` is `MultiIndex`. > Please let me know if similar changes should apply to the case when `idx` is `MultiIndex`.

Yes! It looks to me like these two blocks can now be largely combined. Thanks @Charlie-XIAO 