"The Masque of the Red Death" by Edgar Allan Poe is based on a real event, the Black Death which swept across Europe in the fourteenth century and also on a literary tradition responding to such plagues that includes Boccaccio's Decameron and Defoe's Journal of the Plague Years. In both the real events of the plagues and the literary traditions associated with them, the plagues are considered both moral and divine judgments and tests. It was often thought that plagues represented God's judgments of sinners. Moreover, the situation of the plague tested people's moral character. While the ill, infirm, or poor were trapped in the cities where plague was most prevalent, the rich and able bodied were confronted by a moral choice. They could stay behind in the cities and help people who were suffering, or they could use their vast wealth to escape the plague by retreating to their country estates.
Prospero and his friends fail the initial moral test by deciding to wall themselves off from the suffering of others rather than helping out. They are portrayed as thinking that “with such precautions the courtiers might bid defiance to contagion. The external world could take care of itself. In the meantime it was folly to grieve, or to think.” This idea that the Prince and courtiers should enjoy themselves with frivolous entertainments while their subjects and vassals suffer is clearly immoral, and the appearance of the Red Death at the masquerade suggests a sort of divine retribution for this behavior.