sorry for being 2 years to late but it does because the A.I said that after he/she was finished then he/she would not need you anymore so when you finish it then he/she kills you because you are not needed anymore.
Sure, it makes sense if the player blindly follows orders, but you finished this game with a quote, "The only thing necessary for the triumph of evil is for good men to do nothing." That doesn't make any sense - there's nothing a good man can do in this game!
A more fitting quote would be "The only winning move is not to play - so just close the tab and don't waste your time."