I have been plagued by this problem for a long time with an addon I have enhanced to auto-swap my gear when I switch class combos... The addon is fully aware of the new swap functions.
My best understanding of the problem is this:
The slots may get reordered if you LOG OUT (or in, who knows) while you are in "off" gear...
I know the definition of "off gear" is not very scientific, however:
In my case, I have a specific slot I want active for each primary class. I setup my addon to know what slot is for what class.
As long as I always logout a specific class with its assigned gear, things stay put.
However, if I swap to look at my gear for my other classes and forget to swap back before I log out (or I crash), then most likely my gear is going to move around when I log back in. Since my addon records slots, I know exactly where things SHOULD be, and thus I am 100% sure things get reordered.
I did a lot of experiments a while back to determine if there was any pattern to the movement, and I was not able to find any pattern... Its not like slot 3 is special and moves around specifically, nor is there a specific slot for a specific class, or anything of the such... However, I do think its somehow associated with changing primary classes since my addon auto-swaps for me as I change classes, thus I swap alot and notice when its wrong. I will go for weeks without seeing an issue as long as I only let my addon swap. However as soon as I swap gear manually to look around, or swap for death protection, I start to see this issue (if I log out/crash).