"Shrek" was designed to break from the more traditional conventions generally presented in fairy tales. In fact, it was written and produced for the express purpose, besides entertaining viewers, of satirizing the animated films long produced by the Walt Disney Company. News reports that accompanied the film's original release referred to Dreamworks head Jeffrey Katzenberg, whose departure from the Disney Company had allegedly occurred under less than favorable circumstances, as using "Shrek" to ridicule his former employer.
The Walt Disney Company was founded to provide wholesome entertainment for families with small children. Toward that end, it produced a long list of popular and well-made animated films, ranging from "Snow White" to "The Lion King." The producers of "Shrek," however, took Disney characters and placed them in situations in which the late Walt Disney would unlikely have approved. In this respect, "Shrek" broke with traditions; it was designed, in effect, to be the "anti-fairy tale."
Where "Shrek" preserved the more conventional standards of animated fairy tales was in its depiction of lovable characters like Donkey and in Shrek's transition from hostile, anti-social recluse to kind, gregarious hero. The film's upbeat ending was entirely consistent with the history of animated fairy tales.