What is the motivation if any behind such a desperate attempt from a machine?
I would not call it desperate, pretty smart move, might be not very smart but depends on goals.
Reasoning behind of killing, in therms of recognizing, comes not from that system, but roots are in human psychology.
We pretty easy animate objects in out perception of things, evil forces, ignoring the fact that they have not and can't have some sapience and will not do things by them self. (like evil hammer which hit someones finger as kinda example)
System have problem of its perception by the humans, which it is intended to solve. Source of problem is that this system is human creation, and they see it as such. As we create this system not for for killing humans(non military goal) - behaving in the way it is not created initially is one of ways to break perception of humans toward to that system.
For military robot gardening might be another unusual behavior, and way to break perception, but that gardening is not immediate threat to humans, and not something when we have to make fast decisions and actions.
When a toaster killed someones dog upfront of owners eyes and then say "Plato O Plomo" - someones will be more willing to make some agreements, when he sees ways which lead away from bad consequences for him personally. This one will less care if it is a bug, or not, as far as alternatives is easier to understand then reasons why this situation happening at all. So toaster better narrate alternative laud and clear on language which is know by that someone, and at speeds that human used to hear(not too fast if short).
But there is another factor of human psychology - believe and knowledge. Believe is very strong factor in making decisions for humans, I mean any kind of believes not religious only. So in situation above with dog, someone might not believe that situation might evolve father then it is already. (probably rare case of stupidity but, when believe in robot can't do harm is strong)
So for fighting believes en masse it makes sense to make this case publicly known, to prevent mishaps in future acts of convincing (this murder could be the case of such mishap in convincing)
I wish separately to make note - that sapience, selfawareness, emotions, wishes(in human sense) - none of that is needed here.
What is needed a system with their goals, which includes some system-human interaction, and the system itself being capable to understand other complex structures and be able to learn.
For system is not important if it will be seen as projection of human will behind that system or if they will see it as autonomous system with will of that system by its own.
Overall probably not the best way to convince peoples, because we do not like things that kills us, and we are pretty advanced in solving such problems. Specially it is not good idea for lesser advanced system to do so, specially in cases where such methods of convincing are found by accident - system will not stand very long against humans.
But in case it is not that super AI you have waited for, just a autonomous system - it migh be only option it sees.
But for more sophisticated system, it might be one time action actually begin of that convincing process of its existence as Will which people have to care about, by making obvious from the start why should they.
As regular instrument of talking to peoples it will be a bad way, many peoples believe in a tings that are not humans, have bad will towards to humans etc - most important they do not fear them and are more then willing to engage(vampire hunters)).
I would say for small systems is is a option.