When the animals gather to listen to Old Major, they arrange themselves unconsciously according to their eventual fates. None of them can foresee how events will play out, but their positions in the room correspond to their intelligence and to their affect on the rebellion. For example:
First came the three dogs... and then the pigs, who settled down in the straw immediately in front of the platform... the sheep and cows lay down behind the pigs and began to chew their cud.
(Orwell, Animal Farm, msxnet.org)
The pigs, who end up running the farm, are closest to Old Major, along with the dogs, who eventually become the military force used by the pigs to keep order in the farm. The sheep and cows are behind them, since the sheep are used directly to influence popular opinion, and the cows are used for their milk, which the pigs appropriate for themselves. The sheep are "behind" the pigs, because the pigs can always use them to shout down opposition, and the sheep will remain unaware of this exploitation. The various natures of the animals are also mentioned, giving motivation to their later actions and alliances.