Why do the pigs encourage Moses to stay by giving him beer?

The context you refer to is likely from the famous novel "Animal Farm" by George Orwell. In the book, the pigs don't encourage Moses, the raven, to stay by giving him beer. Moses represents religion in the allegorical novella, and he occasionally visits the farm to lead religious ceremonies and share prophecies of a "Sugarcandy Mountain" where animals go after death. The pigs have no specific motive to encourage or appease him.