According to James Cameron, there's just a "natural tendency of the universe" -- and "forcing factors" within human society itself -- driving us toward the development of an AI like Skynet or Legion.
JAMES CAMERON: Well, Legion is the next Skynet. And I think the conceit here is that there's a natural tendency of the universe toward a certain outcome. And that given all the forces at work in human society, and human technological development, and the, um, forcing factors driving us toward artificial intelligence. Which, all you have to do is talk to any of the expects on it right now. And everybody wants this, everybody wants an artificial intelligence equal to humans to help us, to make money, to improve our defense systems, and all that stuff, you know. And they're all driving toward it, you know. Vladimir Putin has said "The country that controls artificial super-intelligence will control the world", quote unquote. I don't like it when dictators start talking about controlling the world, uhh, you know, even if he's joking, which of course he wasn't. The point is, everybody's stampeding toward this thing, without any real sense of who's in charge, you know. Where are the brakes? Where's the oversight, or the ability for governments to control this process. Well, it's kind of a free enterprise thing, you know; you get enough money, you go develop a super-intelligence. Nobody's running the show, here. So we could very easily be in a situation where we just replace ourselves, with a machine smarter than we are. And by the way, that may not necessarily share our goals. So the thinking is, Skynet was a manifestation of these driving forces. Take Skynet out of the way, well, it's gonna happen again. Take Legion out of the way, it's gonna happen again. It's gonna keep happening, 'cause the universe is driving in that direction, relentlessly. So the question is: how do you resolve that conflict? That innate conflict? Either we're gonna win, but by doing so, we'll have to turn away from what we know, and our technology, and so on, and go back to some kind of dark age. The machines are going to win, in which case we're extinct; we don't have to worry about it. Or there's some other path. What's the other path?
James Cameron Interview - Terminator: Dark Fate
It likely ties into the sentiment expressed in Terminator 2, that it's in our nature to destroy ourselves.
JOHN: We're not gonna make it, are we? People, I mean.
T-800: It's in your nature to destroy yourselves.
JOHN: Yeah. Major drag, huh?
Terminator 2: Judgment Day (1991)
The future tech left in the Cyberdyne factory in the first film helped to accelerate the process, but eventually, we were bound to get there on our own, anyway. At least, that seems to be Cameron's thinking.