From the moment drums appeared in history, alongside earliest mentions of our modern civilization (and probably well before that during prehistoric times), they were in addition to music also used as a tools for communication. With advancements in our culture, came expansion of drums and other percussion instruments into many other segments of our lives, including military.
Military as a one of the most important and dominant forces in our history always drove innovation, very quickly adopting any new techniques that could give army edge on the battlefield, including tools that could help in secondary ways. One of the most important of those tools was of course drum, perfect tool for delivering information to large amount of trained soldiers. Africa, Middle East, India and China were first countries to adopt use of percussion instruments in army (for example Junjung drum used by West African Serer people). The oldest recorded example of drums being used in battle come from 684 BC in China, during the war between Qi and Lu.
Additionally, martial artist used drums for centuries to time their moves, and train themselves to be more efficient.
During Crusades, European armies become aware of battlefield use of drums, quickly adopting this and spreading the world of this use all across Europe. European military drums were used in many ways, from demoralizing enemy, setting up parleys, communication between two warring sides, military communication between ranks, drills, military ceremonies and honor music. This military use of drums managed to popularize drums in general population, which adopted them and morphed drums into multi-purpose musical instruments that were used in countless occasions, including their adoption into music bands and orchestras.
Today, popular term “drums of war” is a metaphor that describes preparation for war.