So why did Janamejaya conduct a genocidal sacrifice?
Let's assume that he - or his advisors - desired the genocide. The question wasn't "should we?" but "how should we?" While kshatriyas are within their dharma to bear arms against an enemy, they still need to show that their actions are consistent with kshatriya dharma. Once we ask the question that way, the choice of a sacrifice becomes clear.
If you don't see where I am going, consider Bush's war on Iraq. There too, the question was never "should we invade Iraq?" All of us know that was a foregone conclusion. Instead, the Bush regime wanted to know "how should we invade Iraq?" That's why the whole weapons of mass destruction story was concocted, with Colin Powell making a speech at the UN asserting their existence. That's why the invasion was justified under Iraq's failure to comply with UNSC resolution 1441.
If you want to understand why Janamejaya conducted the sacrifice, try answering the question "why did the aggressors in Iraq bother going through the UN?" The underlying reason is the same: just as violence backed by law is considered justifiable violence, violence backed by sacrifice is also justifiable violence.
By the way, we shouldn't consider this justification as a mere fig leaf. That would be a misunderstanding. Justifiable violence is far more powerful than unjustifiable violence. What's the difference between a dictator and a mafia don? The latter holds a gun to your head and says "pay up or else." His justification is the gun in his hand and because of that, it has to happen behind closed doors. The dictator is more powerful because he holds a gun to your head and says "pay up or else I will have you arrested." His violence is backed by the law so it can be carried out in the open.
The sacrifice, just like the law, provides moral legitimacy to violence.