Hans Christian Andersen was responsible for some of the best-known fairy tales of all time: who hasn't heard the phrases "ugly duckling" or "the emperor's new clothes"? These tales are a good match with narrative theory, as they often use the sort of binary oppositions described by Lévi-Strauss (like good/evil, beautiful/ugly, friend/foe) and the overall narrative structure outlined by Vladimir Propp.
Many of these tales conform to the traditional "happily ever after" scenario, but some end on a sad note. Ariel's dreams may have come true in Disney's The Little Mermaid, for example, but her counterpart in Andersen's original has no such luck.
Fairy tales are usually seen as having happy endings. Why, then, does Andersen choose unhappy endings for some of these tales?
Are these tales works of pure fantasy, or do they have any deeper meanings or teachings?