First of all, an allegory is a story with characters and the plot symbolizing an aspect of real life. Probably the most common reason as to why writers would write allegories is that they want to deliver a message to the human race. Something that we should think about. Animal Farm is a good example of that. Animal Farm depicts the political blasphemy of a society using animals (comparing humans to animals too) Another reason would be the writer might want to express something in his life but doesn't want to explicitly express it. So he uses and allegory.