In Aristotle's Poetics, he says:
Those who employ spectacular means to create a sense not of the terrible but only of the monstrous, are strangers to the purpose of Tragedy; for we must not demand of Tragedy any and every kind of pleasure, but only that which is proper to it. And since the pleasure which the poet should afford is that which comes from pity and fear through imitation, it is evident that this quality must be impressed upon the incidents.
This is found in Aristotle's first and most important "principle" of tragedy: plot. A viewer of a tragic play will, by the end, feel an aesthetic (artistic appreciation) pleasure in the intricate plot which elicits a catharsis, a purgation of pity and fear.
For example, by the end of Oedipus Rex, we feel an appreciation for all the tragic ironies involving sight and blindness, fate and free will, family love and incest, and truth and ignorance. All of these feelings are the result of a complex plot, a series of oracles, ironies, and complications that, it seems, were destined for tragedy. Ironically, we enjoy the facts that Clytemnestra kills herself but Oedipus doesn't: it seems just to us. We pity both mother and son, and we fear that such corruption may befall our families as well. So, the pleasure comes at intersection of pity, fear, and appreciation of a plot that is resolved tragically but deservedly.