What was the purpose of the rooster that marched with Napoleon in Animal Farm?
After Napoleon takes full control of the farm through the execution of "traitors," he starts to act in a paranoid manner. He remains indoors most of the day, and eats separately from the other pigs. He also does not travel without his trained dogs and a black rooster that crows to announce his presence. This continues into the creation of "Spontaneous Demonstrations" which are Napoleon's method of distracting the animals from their hunger and the continuing decline of the farm:
...what with the songs, the processions, Squealer's lists of figures, the thunder of the gun, the crowing of the cockerel, and the fluttering of the flag, they were able to forget that their bellies were empty, at least part of the time.
(Orwell, Animal Farm, msxnet.org)
The black rooster announces Napoleon's presence, allowing the other animals to develop an unconscious fear of the crowing; they know that Napoleon is constantly on the lookout for "traitors." The black rooster is mentioned as being a "kind of trumpeter," helping to create the sense of ceremony in the parades. He is analogous to the Grand Marshal of a parade, keeping the time and leading without actually being in power. It is also possible that Napoleon keeps the black rooster at the head of the parades in order to provide a distraction for possible assassinations, since Napoleon is paranoid.