"...as they create a contact bridge between two points when they get electrocuted they release an alarm pheromone," says UT research assistant Edward LeBrun. "The other ants are attracted to the chemicals that other ants give off," he adds.
What kind of survival mechanism is that? "Oh! There's danger over there. Let's all go check it out..."
Given that(among the ants that don't have even cooler mechanisms, like specialized suicide soldiers who blow themselves up to shower the enemy with toxins) "swarm the enemy and keep biting and stinging without regards for casualties until nothing that isn't us is still moving" is considered a valid strategy, the chemical signalling actually makes sense: If an ant from another colony, or a predatory insect/arachnid, attacks a single ant, the ant's body automatically releases the alarm pheremone and the attacker gets zerg rushed.
It's just that, against implacable electronics that are totally indifferent to anything except being insulated by the uncounted bodies of the slain, this tactic doesn't work very well(see also: mammals that 'freeze' to avoid predators; but discover that cars aren't visual hunters; but they do kill anything that gets in their way)...