The author will use allegory because people don't like being taught how to think and act. By allegory, the author can give the readers her/his message indirectly, and people are more likely to get the message and understand what the author is trying to convey. They will not feel like they are being told how to act and think.