I'm not saying that recreating religious tropes is what people set out to do, more that as they walked trough the bare space of possibilities they found these well worn paths of logic and simply settled on what felt like convincing lines of reasoning, not seeing that it felt convincing before it was familiar.
[1] https://www.vox.com/the-highlight/23779413/silicon-valleys-a...
You're thinking of an AI with a terminal goal of "Kill all humans", and why would it have that goal in the first place.
But this is making a major error. You could give a superintelligent agent of "Buy gold at $400 an ounce using any means necessary, here is 1 million dollars". The AI could attempt to buy gold on the market at that price and fail and come up with the idea "Humans value gold too much, therefore removing humans will allow me to achieve my goals". Humans are just the ant hill in your front lawn keeping you from having perfect grass, you wipe the ants out with a second thought.
What you should all be fearing is bot swarms and drone swarms becoming cheap and decentralized at scale online and in the real world. They can be deployed by anyone for any purpose, wreaking havoc everywhere.
Every single one of our systems relies on the inefficiency of an attacker. It won’t any longer be true.
Look up scenes like:
https://m.youtube.com/watch?v=O-2tpwW0kmU
https://m.youtube.com/watch?v=40JFxhhJEYk
And see it coming:
https://www.newscientist.com/article/2357548-us-military-pla...
Also ubiquitous cameras enable tracking everyone across every place, as soon as the databases are linked:
https://magarshak.com/blog/?p=169