Why does Prince Prospero decide to have a masquerade in "The Masque of the Red Death"?
A plague called the Red Death has taken lives for long enough that Prince Prospero decides that he must flee from the ravages of this disease.
He gathers "a thousand hale and light-hearted friends" from among the knights and dames of his court, and they travel to one of his fortified abbeys where there are walls with iron gates. In this fortified place, the prince and his many guests surround themselves with as many distractions from the reality of death that they can.
In this allegorical tale by Edgar Allan Poe, the prince decides to have a masque in order to deceive Death and escape time. The guests dance and cavort wildly in a bizarre environment because the prince has "peculiar" tastes:
He had a fine eye for color and effects. He disregarded the decora of mere fashion. His plans were bold and fiery, and his conceptions glowed with barbaric luster. . . There were much glare and glitter and piquancy and phantasm. . . much of the beautiful, much of the wanton, much of the bizarre, something of the terrible.
Yet despite these deceptions within rooms that are each of different color and decor, there arrives one whom none tried to arrest because a deadly terror seized the guests. Incensed that an intruder would dare to enter his abbey, Prince Prospero rushes through the six rooms to the last as the clock strikes midnight. When Prince Prospero looks upon the spectre, he convulses and utters a sharp cry as he falls in death, a victim of his own arrogance and pride. Death claims all--rich or poor.
Six months after locking himself and one thousand of his nearest and dearest friends within a sealed palace in an effort to escape a deadly plague, Prospero decided to throw a lavish masque. The party was to celebrate their "escape" from the Red Death which claimed its victims within thirty minutes of contracting the disease. Unfortunately, Prospero partied too soon and learned the hard way that no one can escape death. A grotesque masked figure appeared at a party where everyone was dressed in bizarre costumes, but this lone figure had the audacity to dress as the Red Death. In his anger, he chased the figure through the seven chambers of the hall and it finally turned to confront him in the final chamber... the black room with red windows. The instant Prospero came near, he dropped dead, and soon so did everyone else at the party. Death will not be cheated.
In addition to the previous answer, it should be noted that Prince Prospero suffered from too much pride. Pride is often the factor that leads to a character's downfall in fiction. The Masquerade was being held because Prospero was spitting in the face of Death. The moral of the story, is that no one can escape death in the end.