Miguel Sapochnik, who directed the episode, told Entertainment Weekly that he looked to history for inspiration on how to best have Jon Snow and Ramsay Bolton face off—specifically, the Battle of Cannae between the Romans and the Hannibal-led Carthaginians in 216 BCE.
In that ancient battle, Carthage beat the giant Roman army in a crushing defeat in part by circling their enemies through a double envelopment. Showrunner D.B. Weiss said that aspect was used as a model in the elaborate “Battle of the Bastards” fight sequence, according to IGN.
But what were the Romans actually fighting about back then?
The significant battle during the Second Punic War was fought near the ancient village of Cannae, which was about 300 miles south of Rome. The village controlled the approaches to southern Italy and had a granary key to supplying food to Romans, according to Dickinson College Commentaries.
The Ancient Greek historian Polybius described what happened:
The Romans...progressed so far that they now had the heavy-armed Africans [Hannibal's forces] on both of their flanks. Hereupon the Africans on the right wing facing to the left and then beginning from the right charged upon the enemy's flank, while those on the left faced to the right and dressing by the left, did the same, the situation itself indicating to them how to act. The consequence was that, as Hannibal had designed, the Romans, straying too far in pursuit of the Celts [also of Hannibal's forces], were caught between the two divisions of the enemy, and they now no longer kept their compact formation but turned singly or in companies to deal with the enemy who was falling on their flanks...
The Romans as long as they could turn and present a front on every side to the enemy, held out, but as the outer ranks continued to fall, and the rest were gradually huddled in and surrounded, they finally all were killed where they stood...
Such was the outcome of the battle at Cannae between the Romans and Carthaginians, a battle in which both the victors and the vanquished displayed conspicuous bravery, as was evinced by the facts.
The battle is still credited by many as one of military history's most significant strategic moments.