Ian Buruma at the TLS:
The notion of Anne Frank’s diary as a source of redemption, or at least consolation, received a further boost from the American stage play, written by two Hollywood screenwriters, Frances Goodrich and Albert Hackett, in 1955. The famous last words in the play are taken from a diary entry on July 15, 1944: “In spite of everything, I still believe that people are really good at heart”. Thus, the story that would end in Anne’s squalid death was given an uplifting Hollywood ending.
The context of these words is hardly uplifting, however. Anne was fighting against despair when she wrote them. In the same paragraph from which the quotation was drawn she wrote: “I hear the approaching thunder that, one day, will destroy us too, I feel the suffering of millions”. But she found it impossible “to build my life on a foundation of chaos, suffering and death”. One month before this attempt to cling to a vestige of hope, she expressed a much darker view of humanity:
more here.