They packed them in ice or left them outside their larder window to keep cool. Also lots of preservatives were used to keep them fresh - its no coincidence that the spiciest food comes from the hottest countries e.g. India - spices would preserve food for longer so were added to keep food 'fresh' - cured ham and smoked fish are also early examples of preserving food. Meat would often be bought or usually killed just before consumption to keep it fresh.