The em dash is used —for the most part— to set a term or phrase apart in order to emphasize it or have it stand out in a sentence.
Here is an excellent explanation of it: use of em dashes
It can be used instead of commas, parentheses or colons.
Often, it is used, also, as an author's comment inside a sentence in a parenthetical statement. Parenthetical does come from the word parentheses, and a parenthetical statement can be found between parentheses, but it can also mean inserting an opinion or emphasis in the middle of a sentence to emphasize an author's meaning by using em dashes.
Here is an example that I have provided in three different forms:
1) The cheetah —the world's fastest land animal— is native to Africa.
In this example, the phrase in parenthesis jumps out at the reader.
2) The cheetah (the world's fastest land animal) is native to Africa.
I have edited 1) and placed it in parenthesis.
In the example above, it is more like an after-thought, a just-for-your information type of thing, rather than acting to emphasize a fact.
3) The cheetah, the world's fastest land animal, is native to Africa.
Now, I have edited it to create an apposition, which is used very frequently, but does not convey a particularly forceful message. It can make a sentence more elegant.
It is a technique for avoiding heavy clauses like this: The cheetah, which is the world's fastest land animal, is native to Africa.
Sentence 1) above is taken from parenthetical statements which also has useful examples.
So, to answer your question. The em dash is a style tool. And my personal opinion is that, if analyzed closely, one can say that it is sometimes a way to represent in writing certain speech features (also known as suprasegmental or prosodic features) that otherwise are not communicable in writing.
In actual speech or dialogue (it does emphasize the phrase)
"I saw Harry —and his brother— at the party." [afterthought or emphasis]
"I saw Harry and his brother at the party." [normal emphasis: two subjects]