Some games are smarter than others, some dont care what or how many devices are connected, or their order, and then some care only about the order they show up.
Often this happens because you might run one game, then plug in a hotas for another and go back to the first game with the hotas still plugged in it confuses things.
Personally I just keep everything plugged in all the time even if it is pushed to the side, or remember that everytime you load a game you make sure that you only have the same controllers plugged in that you use with it. Sometimes you load it up and things are funky so you have to quit and remove the offending controller you left turned on.