Purpose while writing an essay can be defined as the task or job that you are supposed to fulfill.
It could be either arguing your point of view about something, informing your readers, narrating an anecdote, etc...
***EDIT: The answer is actually the reason a writer has to write something***