I suppose whichever goals it was programmed with originally, which likely led to unforeseen consequences, either because of lack of imagination by the programmers or due to a different interpretation than what was intended.
One example could be the AI is put in charge of securing the...