Every time I click on a certain tab inside IntelliJ IDEA it reorders all the tabs. I find this to be super-annoying as I learn the order of my tabs, and then it switches.
This behavior is defined by the Java Look&Feel, you can either change Look&Feel to the one that doesn't reorder tab rows or enable the option to Show tabs in single row (or set the tabs to be displayed on the right/left instead of the top).
See also the related bug report.
This is really annoying and sad, because this issue is from 2009 and it's still unsolved. I tested multiple configurations and find a suitable solution.
For my workaround and a more intuitive behaviour go to Settings -> Editor Tabs
Apply and close the window. Then go to the menu bar: Window -> Editor Tabs and uncheck Alphabetical Mode if checked. This change let you reorder your tabs by drag&drop and new tabs are appended after the active tab. This also annoying, because most editors append it to the end of a list.
Maybe you prefer the Alphabetical Mode but the sorting is not consistent, because only one directory (the closest one) of a file is evaluating for the sorting. The parent folder and parents parent, ... are ignored.
There is still an annoying behaviour, which is more annoying when you place the tab bar on top/bottom. When using right/left you have still the same problems, but you get more space and it don't start to annoy you so fast with a vertical list ;)
With top/bottom placement you get another annoying behaviour:
tested on IntelliJ Cardea