Dialog allows characters to interact with their setting, with each other, and with the reader. Dialog challenges the writer in both use and execution, both technically and artistically. The rules of use follow the same pattern as the use of description and exposition, but because dialog feels like a different animal the temptation to treat it differently can be excruciating.
Dialog serves the same purpose as exposition, and can be treated the same way. There is nothing intrinsically special about dialog to set it apart from narrative or descriptive exposition, only the “voice” and perceptions of the speaker should differentiate it from the surrounding text. As small a thing as this is, it serves the very important purpose of introducing variety into the reader’s experience and serves to break up descriptive and narrative passages.