1- Utilize garden and slaughter waste, kitchen garbage, and roadside waste. Pigs are a great way to recycle this stuff and create something edible. Sort of like chickens and eggs -- take stuff I won't eat and turn it into something that I will, like eggs.
2- Utilize pasture. Several breeds of pigs do very well on pasture.
3- "Till" the ground. Most pig breeds are very good rooters. When confined to a small area, they root the entire patch up. So they can be used to break sod and help prepare a site for a garden. To coear out brush and understory, they can root up saplings so that they are easier to remove. I once used a pig to do the major work of removing large tree stumps. That hog did a great job on stumps!
4- Fertilizer source. You could gather pig manure with a pooper scooper, just like you would clean up after a pet dog. Or if the pig is confined to a pen, you could harvest the litter mixed with manure and transfer it to a compost pile.
5- To qualify as a farm. Some states offer tax breaks or even improvement grants to small farms. Depending upon the location, keeping a few pigs can meet the qualification.
6- For efficient home meat production. Pigs are fairly efficient when it comes to turning feed into meat. Plus they are small enough in size that a homesteader could do the slaughtering and butchering at home. Pigs can be slaughtered at any size, so a homesteader could opt for a handleable size. A cow doesn't often those advantages. They require a lot more food to create a pound of meat. Plus they are a big animal, not always suited to a small homestead.
7- For an organic, non-GMO meat source. Since pigs are omnivores, it is fairly easy to feed them "cleanly". Commercial feed is not mandatory. And since most pigs are slaughtered by 6 months of age, a farmer could time the feeding of their pig to their crop cycle, thus raising or trading for most of the pig's food. Then by the time the cropping season is over, it's just the right time to slaughter the pig.
8- As a source of income. Prior to 1950's it was common for small farms to raise a few pigs for the extra cash they brought in. While there are lots more regulations about raising pigs now then back then, a small homestead farmer can still make a bit of cash. Selling piglets is one way. Selling individual eating size pigs directly to the consumer is another. Using piglets for trading can be a good deal for both parties.
9- Enjoyment. Though many small farmers won't admit it in public, they often have a bit of livestock simply because they enjoy them.