Ants are defending their colony from a threat, and the only way they can attack (or really do anything) is by biting. Think of it like a Godzilla style of scenario – if a giant organism attacked a city, people aren’t just going to run away, there will be a great effort by the inhabitants to deal with the threat.
Also, yes they do try to attack inanimate objects, because again it’s a threat to their home. I actually found this interesting article: [Ants cause equipment failure in the French Alps](https://www.thebmc.co.uk/abseil-slings-when-ants-attack), where biting releases formic acid (named after ants, *Formica*) that can corrode materials.
Latest Answers