Greek tragedy
Greek tragedy was a form of drama invented by playwrights such as Aeschylus, Euripides and Sophocles, in which a tragic hero such as Oedipus or Orestes acts in good faith to strive for a positive outcome but has the unfortunate effect of bringing about suffering. Often the hero has what is called a tragic flaw, a personality defect or trait that brings about the negative outcome.
In the theatre, a tragedy, despite the often grisly ending, brings about a cartharsis for the audience; according to Greek philosophers such as Aristotle, the cartharsis happens because theater-goers experience the pain vicariously, watching it happen in other people, and therefore get a kind of release and are relieved that the horrific fate did not happen to them. The nature of the flaw may also teach a moral lesson.