Question: why are the hokages out of order?
Answer: They think that because of Hiruzen's inability to make hard decisions the village suffered so many losses. Hiruzen devices to step down and nominated Minato as the 4th Hokage. During the Nine-Tails' attack, the shinobi address Hiruzen as the 3rd Hokage out of respect and because they recognize him as their leader.