They bury the hams simply because they are the remains of former comrades, and while Orwell doesn't elaborate on their intentions, it seems that they just want to pay them proper respect. Boxer destroys the beer barrel probably because the animals associate alcohol with the laziness and cruelty of Jones, who was often drunk. In fact, he was drunk when the revolution broke out in the first place. The animals thus have a particular aversion to alchohol, which is reflected in their fifth commandment: "No animal shall drink alcohol." Taken together with their destruction of the whips, harnesses, and gelding knives, as well as the ribbons that horses wore in their manes, it seems that the animals are intent on fulfilling the tenets of Animalism by destroying all of the corrupting and oppressive influences of humanity. The farmhouse itself is to be left undisturbed as a museum to their former lives.