All authors have a reason for writing. Just remember P.I.E.
Persuade: The author is trying to get you to do or try something.
Inform: The author is trying to give you information and teach you facts.
Entertain: The author is trying to make you enjoy the story by keeping the readers’ attention.