@bigbootyboy
Logically, at the moment, it is one of, if not the only way. Remember that he isn't human. He is basically a machine, which appears human. He functions based on a lot of complex rules, and some large simple rules. But along the way, a loophole/bug occurred. It created a paradox. He has to save humanity, from humanity. The demons are not humanities enemy, and normally have no intention of harming them. Humanity is the only one looking for conflict. In other words, humans are seeking to put themselves in danger. Humans fight humans once the demons are gone. So basically he has to destroy humans to protect them, which works if there are no more humans needing protection. Demons have been declared Humanities enemy, so they also are on his hit list, but can be dealt with in different ways. If he sends them away, they no longer are a threat. But to do so, they need his core/heart, so they now are his enemy since they basically need him to die, in order to leave. This forces him to fight them since they now are his "enemy". Additionally, once demons are gone, he loses the major purpose for his existence. He was a creation not meant to question his existence in the first place, but unintentionally developed it because of how he was designed.
He found a loop hole, where if the demons either defeated him, or left peacefully, he would not have to kill them. So he defected, and tried to get them to move out quickly, only to find out in the end he needs to die for them to go. And he isn't allowed to kill himself while humanity is left alive. So his only choice was to become everyone's enemy. He does not hate demon's directly. He hates many humans a lot, but not every human.
And to be fair, he has every right to basically want to destroy humanity. He was ultimately created by them to eventually kill himself, while taking humanity's enemy with him. A tool, nothing more. That would have been fine if humanity didn't give him the means to acquire a desire to find value in his own existence. This one part makes humanities whole plan pretty fucked up. They are literally telling him to his entire reason for existing is to go and kill a bunch of relatively innocent lifeforms, just because humans dislike them, and then kill himself. But also, that they will let him be fully aware of what he is doing, and even if he is against it, or even just dislikes it, he is going to be forced to do it regardless.