I think what BetterRed is referring to in Word is that it can convert the quotes as you type. If you type a double quote using the keyboard, type some text and then another double quote, Word will convert these to the curly quotes appropriate for the start and and of a quote.
As to why the bug happens in a few places, the only reason I can think of is that the people think that the way Word does it is correct. Actually, I can picture a tester raising a bug report pointing to Word as the way its supposed to be handled. I've seen a few reports like that over the years.
Another possibility is languages. Different languages use different characters for quotes, and I think Spanish uses dashes. I could see someone having a set of possible opening quote characters and another of closing quote characters. Then it is matching any element in the sets rather than the matching the similar elements. And I'll admit it, I've written some code like that

Luckily, I caught it while testing.