I've always considered "turns against" to be an unlikely scenario.
The first problem is that you've skipped over how it was created and you're focusing on how it took over once it was created.
And if you're going to do that then you can replace "AI" with "aliens" or "mutants" or "witches" or "Satan".
I envision the machine becoming an "infallible advisor"
And if that was what it was intended to do then it is operating within spec. So what is the difference between that system and a non-AI system designed to provide the same service?
Obligatory car analogy - an AI designs a more efficient car. A non-AI expert system designs a more efficient car. What is the difference between the AI and the non-AI?