The main tenet of authorship is that all writers have three intentions when producing work.
The first potential purpose is to inform. This type of narrative comes in the form of research-based or data-driven papers such as journal articles, biographies, historical non-fiction, science, and even auto-biographical pieces. The Perks of Being a Wallflower does not fall into this category because author Stephen Chbosky created this story, making a fictional account of events. He may want to inform readers about the character of Charlie, but not for the purposes of giving actual information.
The second purpose is to persuade, or convince. This type of literature comes in the form of argumentative literature where someone puts forth a point of view and states reasons for readers to agree with the posture. These writings are most often evident in position papers (pro/con), in advertising literature, in legal works, and even in research-papers that aim to test a hypothesis or de-construct a theory. The Perks of Being a Wallflowerer has an argumentative/persuasive title, for it appears to list several ways in which being a social witness is better than being actively involved with everybody, however, you will find that Charlie's narrative counter-argues the title of this epistolary novel.
Finally comes the purpose of entertaining. This is the purpose of the author of this novel. The rationale is that Chbosky purposely invented these stories to gain an audience of, either, adolescents or young adults that could commiserate with Charlie, relate to him, and get hooked on the central messages of the novel. Hence, the main purpose of The Perks of Being a Wallflower is, undoubtedly, to entertain and gain an audience.