According to Steven Raichlen, author of "The Barbecue! Bible," pigs were fed apples to fatten them for fall harvest festivals. Putting an apple in a roasted/dead pig's mouth is perhaps a way of showing the cycle of life and death of a pig; alive or dead, it gets to "eat" apple. Raichlen added that the use of apples is solely aesthetic. An apple helps make the roasted pig look nicer.
The tradition of putting an apple in a roasted pig’s mouth goes back at least 800 years. Like a Thanksgiving turkey, a roasted pig is part meal and part decoration. A juicy pig garnished with fall fruits and vegetables sets a seasonal tone and theme for a harvest celebration
Some farmers claim that feeding pigs apples sweetens the pork. Some traditions place the apple in the pig’s mouth before cooking, while others use an ear of corn or a ball of aluminum foil during cooking, then replace it with an apple before serving. Roasting pigs is traditional in many countries in the Caribbean, Europe and Asia, usually at holidays. Europeans roast pigs for Christmas; Asians do it for New Year’s. It is traditional to eat the roast apple as well.