What is the purpose of the dashes?
Dashes and parentheses indicate an “aside” to the point you are making in your sentence. Although sometimes considered interchangeable, each serves a specific purpose in your writing. Dashes interrupt your writing to insert an interjection or pause, while parentheses gently add information to your point.
A dash is expressed as an "em dash" ( — ) in printing, is expressed in plain text as two hyphens ( -- ) and is used in place of a comma, colon or semicolon for greater emphasis. It denotes a major break or pause and should not be overused.
The dash functions almost as a colon does in that it adds to the preceding material, but with extra emphasis. Like a caesura (a timely pause) in music, a dash indicates a strong pause, then gives emphasis to material following the pause.
The dashes create an emphasis on parts of the sentence and take on the role of either commas or parentheses. When she uses the dashes as commas like the stanza from above it shifts the focus on the words that follow the dash, so the phrase “that oppresses” is meant to resonate with the reader.
Dashes add more emphasis to the material they set off. This emphasis can add drama or emotion to the affected words, phrases, or clauses. Notice the difference in tone in the following pair of sentences.
This is a good example of when to use such as dash in a sentence. The em dash is used to represent how the first speaker is being interrupted by the second. This makes them a useful punctuation mark when we want to convey an argument or rapid back-and-forth dialogue between characters.
The dashes' ability to create silence within the poem, forcing the reader to stop and take a break wherever one occurs, Johnson refers to as a “musical device” (x). The pause they create mimics the same effect as a comma, coaxing the reader into pausing, though on a slightly different scale.
Dashes are used to separate groups of words, not to separate parts of words like a hyphen does. (Learn more about the difference between a dash and a hyphen here). There are three forms of dashes: em, en, and the double hyphen.
- To set off material for emphasis. Think of dashes as the opposite of parentheses. ...
- To indicate sentence introductions or conclusions. ...
- To mark “bonus phrases.” Phrases that add information or clarify but are not necessary to the meaning of a sentence are ordinarily set off with commas. ...
- To break up dialogue.
The dash (–) is used to set off additional material within a sentence, often in order to emphasize it, to set off appositives that contain commas, or to indicate missing words.
What does a dash indicate in dialogue?
To show an interruption of the spoken words, include an em dash inside the quotation marks, at the point where the dialogue is interrupted. “I knew you'd drop it.”
The EN DASH and the EM DASH can be used to set off an augmenting or explanatory word or phrase in a sentence that could stand alone without the insertion. Brackets, commas and colons can act as alternative forms of punctuation.

Resources for learning English
A hyphen joins two or more words together while a dash separates words into parenthetical statements. The two are sometimes confused because they look so similar, but their usage is different.