Final answer:
Pesthouses were primarily used as isolation facilities to contain the spread of contagious diseases by separating the sick from the healthy population.
Step-by-step explanation:
The main purpose of a pesthouse was to serve as isolation facilities for those suffering from contagious diseases. These pesthouses were used to prevent the spread of diseases by isolating the sick from the healthy population, particularly before the development of modern medical and hygiene practices. Throughout history, in response to outbreaks of diseases like the Black Death, leprosy, or smallpox, authorities often established these pesthouses as quarantine measures. The troubling ethical question arises regarding the extent to which society can impose isolation on individuals for the greater public health, and how to balance this with the rights and humane treatment of those infected.