A supervillain builds a bunch of robots to fight a war against everyone. The countries of the world will have to cooperate and make alliances to beat them.
Plus, now it would actually be moral to build cool weapons.
What if the robots are fax machines and printers that every nation has to use to formally declare war, but because both are notoriously awful to work with it unites everyone to end war by ending fax machines and printers?
Even crazier than mine! Take my upvote.
I unironically believe that robot battles are an immediate win-win for robots and humans. Humans get to slip out of war with the military industrial complex being none the wiser, robots get to iterate over generations of dexterity testing, and they can just hot swap their cortex to boot! When you can just upload into a new body, war is basically playtime.
Now how that manifests long term is a matter of some contention.