The list of material slots has a “search” area at the bottom of it - it can be hidden or shown with a little arrow.
If the list of materials is being sorted - ie, the “AZ” button is selected - then the buttons that move materials up and down in the slot list should be hidden. While sort is active the materials will always show in that order, so clicking “up” and “down” have no visible result; they seem to do nothing. But they do actually work, but they do so blindly - you won’t see how they have changed until you turn sorting off.
So, in short, the actual order of the materials is hidden from the user while sorting is enabled, therefore you should not be able to blindly change the actual order at that time.