You design a super system that has access to a shit ton of data and it can interface with pretty much every device on the planet. Let's suppose you gave said AI the task of maximizing your portfolio's profit. Based on the boat loads of data it has, it figures out that stocks of companies plummet when a key figure in the company dies. It identifies the competitors of the companies in your portfolio. It identifies the key players in those companies. It concludes that if these people were dead, their companies would crash and your profit would increase. It uses knowledge of how humans die, and use that combined with devices it can interface with, and eliminates the competition.
Yes, yes, seems too far fetched (i feel weird talking about this too). But see, it's possible. of course no one thought of teaching a financial software that killing people is bad. No one foresaw that it would figure out that this was a way to maximize profit. No one saw that the interfaces we provided it to study consumer behaviour and correlate with stocks, can be used to actually influence said systems to take human life.
Is this a computer turning evil? No. Is it connected to some sort of motivation for self-preservation or "eradicate man kind" or some human emotion of jealousy? No. It was just a logical result from given data and task, on which the computer was able to act.