Ants don't walk in line over the stove. It may not be fear, but there is something hardwired that tells them not too, or they would be extinct long ago
I think it is not unlike a crush involving lots of humans in a confined space.
We see roundworms with decentralized nervous systems show chemical traces of fear, so it is actually hardwired deep in organisms and has been there a very, very long time. Fear is just too useful as a survival mechanism.