Animals walking in circles is not a random thing, there is a science behind this strange behaviour. This behaviour can be instinctual, or a sign of neurological issues, or even medical conditions. Here are some reasons why animals walk in circles:
In some animals, bacterial infections, injuries, or brain inflammation can affect their neurological function. This can lead to circling as a physical symptom in animals.
Just like humans, animals depend on their inner ear for balance and sound detection. An infection in the ear can confuse their sense of direction and cause them to walk in circles.
Environment triggers, like certain chemicals, stress, or trauma, can change an animal’s behaviour. It is common in lab animals or those in captivity.
Geomagnetic disturbances may cause disorientation in animals that rely on Earth's magnetic field for navigation.
In some cases, it is a natural instinctive for animals. For examples, sheep herding or fishes swimming in circles for their safety. It can also be used for communication.