Pineapple is often served with gammon because the sweetness of the pineapple complements the saltiness of the gammon. It also adds a fruity flavour to the dish.