the friend was the one who created the loophole in the AI code and was afraid that the accused would find out and maybe expose him or smth idk, so by sending accused to jail, accused wont be able to figure out about the loophole. that's my theory anyway