What is the purpose of Snowball in the novel Animal Farm?
Animal Farm is, of course, an allegory of the Russian Revolution and the rise of Stalin, and in this context, Snowball should be understood as the counterpart of Leon Trotsky, the hero of the Revolution and the Civil War who was driven from the country and ultimately murdered by the command of Stalin. Similarly, Snowball is driven from the farm by Snowball after their dispute over building the windmill. So on that level, Orwell is drawing an obvious parallel between the events on the farm and the events in the Soviet Union.
But on another level, Snowball is an example of how totalitarian governments can use fear and scapegoating to justify the naked exercise of power. After Snowball's forced exile, Squealer and Napoleon hold him up as a scapegoat for everything. When the windmill is destroyed, Snowball is blamed. When the public executions of several animals takes place, it is because they are supposedly in league with Snowball. The memory of Snowball is also used to show the extent to which history and information can be twisted and distorted by power. Referencing Snowball's heroic behavior at the Battle of the Cowshed, Squealer predicts, just after Snowball's departure, that:
I believe the time will come when we shall find that Snowball’s part in it was much exaggerated.
His prediction is correct, as he spins and distorts the memory of the event so much that Snowball is believed to have attacked the farm on that day. The animals vaguely remember that things happened differently, but they can no longer be sure. So Snowball's character is quite a revealing one in the context of the message Orwell wants to get across.