I don't think it's so clear. The Union created the device in the first place, and while Kaylon genocide was not its sole intent, they had to consider the implications of that possibility in its creation. What if the Kaylon had not agreed to a ceasefire and kept fighting? The Union could have very well continued using the device until all the Kaylon were dead (possibly eventually using a similar plan to the Moclan-Krill plan), and I believe this too was a possible outcome the Union were prepared for. Not their preference, obviously, but they would act in self-defense.
Once the device was stolen, the Union felt responsible for its misuse, and informed the Kaylon to honor their ceasefire agreement. I believe this outweighed (just slightly) wanting to prevent a Kaylon genocide. What if the Moclan-Krill alliance had created the weapon first? I am sure the Union (if they knew about the device) would have advocated a course of action similar to what they did in the first part of this episode to reach an armistice of some kind, but if the Moclans and Krill refused? Would the Union have made the same effort to stop it? Of course, in that case, the Union is not the one committing the genocide.