Why does Prince Prospero hide in his palace?
Prince Prospero hides in his "castellated abbey," secluded from the rest of the kingdom because he believes that, by doing so, he can escape death. The prince suffers from tremendous pride (and an almost total lack of concern for his subjects). He and a thousand of his most healthy and wealthy friends retire to the abbey, behind tall walls; they bolt the gates and weld them shut. Their intention is to leave no way in to the abbey and no way out. They believe, with the prince as their leader, that, in this way, they can keep the Red Death from reaching them and thus prevent their own demises.
This, however, proves to be impossible. The fact that the Red Death is able to enter the abbey and take the lives of everyone in it -- despite their precautions -- shows that none of us can escape death, no matter our wealth or resources. The prince believed that his fortune and status as an owner of such a property would grant him a stay of execution of sorts, but he is wrong. In the end, this story shows that death comes for all us, no matter who we are.
If you look at this story from another perspective, such as that it is really a dream that Prince Prospero is having, then he is not hiding in his palace, he is deathly ill and in bed, dying from the red death in his palace.
One way to view the whole party, the masked ball where the red death shows up is as a fantastic dream that Prince Prospero has as he is in the grip of the red death hallucinating with fever. The rooms symbolize the phases of life, the clock in the last room monitors the final hours, minutes of the Prince, and when finally he confronts the red death, no one survives.
The prince truly believes he can avoid the Red Death. He is aloof enough to think that he can invite only his close (rich) friends into his place and outlast the disease. These qualities are not good qualities of a prince. He should be out helping his people. Instead, he thinks that he can escape death and can party with all of his friends. He does not want any talk of the disease, and he wants everything that goes into his party to be fun, extreme, and inviting. He wants nothing to do with the ugliness of the Red Death, which is why it comes after him.