Earlier quoted context omitted.
I disagree—LLMs don't use them properly. They always put a space between the words before – and after – the dashed part.
Using spaces is not wrong. Typographically, a hair space or another thinner than usual space is usually used, but in plain text a space is often preferred. Style guides vary of opinion on this, but newspapers often space them. Without a space they end up looking like elongated hyphens joining the words on both sides. That's not their function.
Its not wrong for en-dashes (and en-dash set open—with space on either side—is generally an alternative to an em-dash set closed.) And its not wrong on the trailing side of an em-dash used in dialogue to show an abrupt stop mid-sentence if the stop is followed by a new sentence. And there's a few other particular uses, but, generally, setting an em-dash open is wrong.
> but newspapers often space them.
I've never seen a newspaper set em-dashes open, but I have seen them use en-dashes set open instead of using em-dashes at all. Given the space premium in print newspapers, em-dashes set open, which would consume enormous horizontal space, would, other concerns aside, be an odd choice.