Take, for example, what I consider the most perplexing example of all: Darth Vader's apparent subordination to Grand Moff Tarkin. You will recall in Episode IV where Vader famously comments on an Imperial officer's skepticism of the Force while choking him with the Force, and Tarkin orders him to release the officer. This was not a request, but a direct command... Grand Moff Tarkin appears to be second only to the Emperor. Conversely, Grand Admiral Thrawn was subordinate to Vader, even though he was the highest military rank at the time.
The real reason for Tarkin ordering around Vader is that originally Lucas conceived of the Emperor as just a figurehead, with the real power in the Empire resting with the governors and military leaders like Tarkin and Motti. This was obviously changed by the time of Ep. V, but some remnants of it are definitely there in Ep. IV.
In-universe, I believe Vader largely operates outside or even above the normal hierarchy, much like the Emperor's Hands do. It was probably more that Tarkin wielded enough personal respect/power in the Empire that he felt able to order Vader around than that his position as Grand Moff gave him any actual authority over him.
I remember reading that Palpatine also deliberately kept the power structure of the Empire fragmented in order to play all the self-serving, ambitious underlings he had (whom he needed to implement his sweeping change of Republic to Empire) competing with each other and jockeying for position so they wouldn't be a threat to him personally. That's part of the reason the Empire fell apart and never fully recovered after his death.