He is a symbolic character who represents religion and the idea of an afterlife.
While the other animals are working hard to build a better society, Moses is telling them about Sugarcandy Mountain, a place where animals go after they die and never have to work.
This idea of a utopian afterlife distracts the animals from the struggles they face in the present and undermines their efforts to build a truly better world.