Most critics and readers can only assume why an author constructs a specific text. Only those texts in which an author details exactly why the text was written offers any real explanation. Outside of that, people can only assume why the text was written based upon their own personal interpretations and justifications.
As for Edgar Allan Poe's short story The Masque of the Red Death, readers who possess knowledge of Poe's dark and depressing past can imagine the reasoning behind his construction of the text. Poe lost three women, who were very important to him, to tuberculosis. His ability to create dark and horror filled texts, backed with his personal knowledge of the disease, could easily lead one to decide that Masque was an attempt to describe the horrible affects which tuberculous had upon its "host."
Given that tuberculosis was one of the main killers of the 18th and 19th century, Poe was both publicly and personally surrounded by it.
Outside of that, Poe could have chosen to write the story simply based upon the fear people had about contracting the disease and the alienation and isolation which was found when people were found to have tuberculosis.
In the end, Poe was a master storyteller. His tales of horror and murder were renowned. The fact that he choose to construct a tale about a disease running rampant in the Western World simply could have been to simply scare or to educate. In reality, no one will really ever know.