Just like humans all animals get in fights with rival groups, including insects like ants and hornets. Humans aren’t the only species on the planet that like to go to war.
Matabele antsprey on termites. They will storm the termite’s colonies in huge numbers, a hunting strategy rather than all out war. Slave-making-ants will raid other colonies in order to capture young ants to serve as slaves in their colony. These ants release a perfume that mimics the scent of the host ant’s alarm signal. This causes their victims to panic and abandons the nest. The slave-making-ants will then go in the nest and steal the hosts young, who will then grow up to serve the raiders.
Japanese giant hornets will the hives of Japanese honeybees. In retaliation, honeybees will lone hornet scouts and use their wings to make themselves vibrate so fast that they actually raise the temperature of the air around them to the point where the trapped hornet is cooked by the intense heat.
Why do you think some of these insects go to war? What do they hope to accomplish from it?