Diseases that led to epidemics were transmitted from person to person during ship voyages, then to people at the destination. People first experiencing the flu are infections for three days. Anyone who boarded a ship in Europe with the measles could infect others for nine days. Those with smallpox were infectious for about 20 days.
Initial European voyages across the Atlantic Ocean took 30 days or longer. In most cases, all infected individuals died or recovered and disease transmission stopped before the ship reached the Western Hemisphere.1
As steamships provided faster journeys, pathogens had a greater opportunity to reach North America and impact a new group of people. Quarantines were designed to isolate diseases on ships until the transmission process had run its course, and the risk of infection was low enough to allow people to come onshore.
ships sailing to Norfolk brought yellow fever and smallpox, and quarantines were required during disease outbreaks
Source: Stay Away From That Port!