This is the same logic they used with the Puma sisters in Dominion TP.
I figure there aren't many among our rather youngish forumites who remember that old Shirow series. The Puma sisters were major baddies and antagonists in the first volumes. Then suddenly and without transition they become part of the TP and are assigned to work with Leona Ozaki, the main character, who is batshit furious but has no choice. The explanation is: the Puma sisters are androids and aren't legally responsible for their bad actions, therefore after capturing them the TP decided to put their crazy skills to good use and turn them into TP agents. Leona would rather throw them into a compactor... but it's not her decision to make.
The same plot applies here, if I understand it right. The former baddie got amnesia, forgot her evil self and turned into a new persona. Since this new persona hasn't done any evil deeds, why, the law has nothing against her! And so she can now become one of the hero team. Obvious and peachy, ain't that so? Shame on Xiao Yu who doesn't seem to agree!