In George Orwell’s Animal Farm, Moses the raven represents organized religion, hence the name “Moses.” Like their allegorical counterparts in the Russian Revolution, the ruling pigs initially considered religion to be an enemy of the people, and an “opiate of the masses.” The fear was that, if the animals believed in an after-life paradise, they would not be motivated to change their earthly conditions in this life. So the pigs sought to discredit Moses soon after taking power. Here’s how Orwell puts it in the novel:
The pigs had an even harder struggle to counteract the lies put about by Moses, the tame raven. Moses, who was Mr. Jones's especial pet, was a spy and a tale-bearer, but he was also a clever talker. He claimed to know of the existence of a mysterious country called Sugarcandy Mountain, to which all animals went when they died.
Moses leaves the farm, but then, interestingly, Orwell has him reappear late in the book. But now, everything has changed on Animal Farm, and the pigs are not in such a hurry to get rid of him.
A thing that was difficult to determine was the attitude of the pigs towards Moses. They all declared contemptuously that his stories about Sugarcandy Mountain were lies, yet they allowed him to remain on the farm, not working, with an allowance of a gill of beer a day.
Why do the pigs let Moses hang around? Because by now they have become much the same as the cruel master they overthrew, Mr. Jones. Now they see the value in having their workers listen to Moses and go about their daily tasks with good behavior and a minimum of fuss. Many people feel that religion serves this function in a society.