Originally 200 years ago, to avoid France and Spain (who we were at war with) (and the high duty imposed by the French on their wines) the British formed an alliance with Portugal and sailors travelled the long way round by ship, ie up the west coast of Spain. They found after months at sea that the wine had gone off. So they started to add brandy which gave it longer shelf life and Port was invented. It's added at fermentation now, rather than afterwards, as at its inception.