The thing is Youka had so deeply interwoven himself into Qin's intelligence network that killing him would basically destroy the entire thing. At this point it isn't really even known if he is a traitor, we only have Kan Pishi's word saying that he is. When the choice is to either take a nominal enemy at face value and decapitate your intelligence network, or gamble that your agent is still loyal and keep your intelligence network, the choice isn't nearly as stupid as it seems.whether or not it worked out historically it is still the stupidest thing you could possibly do, letting a known traitor go free on the promise he's totally gonna not betray you this time. i somehow doubt it wasn't this stupid historically and the manga just messed it up, maybe they had his family hostage or something.