This. Shanks was dealing with Kaido, who wanted to take advantage and attack the WB Pirates as they made their way to Marineford.Well, it is said/reported he was fighting another member of the yonkou at the time of he war and arrived only after having done so, which was rather quick as noted by others.
Surely it is part of the plot, but if it is to be described with the reasons given in the manga/anime, then this was it.