Our pigs love to eat the ashes from our wood burning (after they cool a bit of course). We don’t have any pig husbandry books from the 18th century or earlier, but wood ash and charcoal are commonly recommended in many old farming references. Wood ash seems to have been used as a cure for all kinds of swine illnesses. Several old books indicate ash improved feed efficiency and increased bone strength. Generally, hardwood ashes were preferred over softwood. We haven’t been able to find any recent research that digs into the biology and chemistry of what the ashes do for the hogs. One advantage might come from the alkalinity of the ash. Another theory is that the ash provides minerals, since trees have deep roots that pump minerals from deeper, less leached soil strata and deposit them in their wood fibers.
We don’t really have enough evidence to say that pigs fed ashes do better than pigs not receiving ashes. We can only observe that the pigs are glad to eat it, so they seem to be convinced they are getting something out of it. We make wood ash for free every day in the winter, so why not?