The purpose of any dialog is to demonstrate a conversation between people. Showing your characters having a conversation can help you develop them. You can also use dialogues to advance your story.