Someone should make a Terminator style film, actually a book would probably work better, where the robot apocalypse is hastened by a whole bunch of different people, some kind of skeezy and up to no good but most just trying to make an honest buck and not realising the impact of the out of control AI they are working for until it's too late.
I mean, I know we are living through basically the same thing with climate change and large corporations in reality but a novel would be cool too.
Daemon by Daniel Suarez is kind of like that, except it turns out the AI is arguably good and not exactly an AI. It's an excellent book, with an excellent sequel.
Not exactly what you are looking for, but in the movie Cube (https://www.imdb.com/title/tt0123755/) a giant machine is built to kill people. IIRC, there was no real purpose behind the machine, it was kind of just built by bureaucratic accident.
I mean, I know we are living through basically the same thing with climate change and large corporations in reality but a novel would be cool too.