Within the episode dialog, Mr. Spock clearly says that the path of destruction indicates an origin from outside the galaxy.
Which is just silly. How could Spock know? Apparently, the only way to ascertain that a solar system has been eaten is to visit that system via starship. Spock's ship only visited a handful of systems. Even if those lay in a beeline (which is highly unlikely, considering how unlikely beelines are in nature), Spock would have no way of establishing the distance of the hypothetical point of origin; at most, he'd have a direction. And
all directions eventually lead to outside our galaxy, so that's not really very helpful...
This makes the theory that it was an anti-Borg weapon unlikely, since the Borg are clearly part of our galaxy.
Also, the DDM would make for a pretty idiotic anti-Borg weapon. The characteristics of a good anti-Borg weapon include being able to counter-adapt to the Borg adaptation routines. How could this hugely expensive machine ever adapt when the only trick in its sleeve is a beam of "absolutely pure" antiprotons? It's not even a single-shot-kills weapon, as it goes easy on both of the starships it encounters in the episode. That's not what an anti-Borg weapon should do,
ever.
The civilization that invented it didn't necessarily go after populated worlds.
And as far as we know, the machine never did go after populated worlds.
Sure, it ate 400 people who rather insanely beamed down to an already targeted planet. But that's not necessarily the machine's fault.
Also, our heroes thought the machine was heading for a densely inhabited part of the galaxy - but they had no proof the machine would do damage to that region. Things could have gone either way: if the DDM were a genocide weapon (a malfunctioning one, or a fully functional and deliberate one) like they speculated, mayhem would have been inevitable, but if the DDM were any of the other possible things, the inhabited worlds might have been left untouched. For some reason, several planets in the DDM's last port of call were left untouched, after all... Right after the possible mishap with the planet that held 400 intelligent lifeforms.
Timo Saloniemi