Once a disease got into a city, entire cities were, indeed, cut off---the sick and the healthy together---because nobody could be sure how the disease would spread if free commerce were allowed into the surrounding cities and towns.
(There's an interesting parallel to COVID-19, in that while we do understand germ theory of medicine, we don't have accurate enough testing to determine if the average healthy-looking person is a carrier. So the practical solutions lean towards the conservative side of safety. More accurate, higher-speed testing could decrease the need for general behavioral constraints in the population... If, for example, there was a 'forehead scanner' to tell us if someone had COVID-19 to 99.999% accuracy, instead of merely had a fever, we could install it at every store entrance and forego masks).