The appendix is an organ located at the end of the cecum of the large intestine, which is ubiquitous for humans and other mammals. The digestive system of pigs is similar to that of humans, so they also have an appendix, which plays a physiological function similar to that of other mammals.
For pigs, the appendix may also help digestion and absorption of food. Although the specific function may vary from species to species, it is part of their body structure.