Traditionally, Yorkshire-style potted ham was a recipe designed to preserve leftover ham so that it could be eaten multiple days later. The packed pots of ham would be topped with more butter (or another fat) to seal out air, which is how it was preserved.