How did Skynet actually become self-aware?
Was it a bug in Skynet's System-core programme, or did the programme simply evolve even beyond the imagination of its programmers?
Skynet's intelligence would appear to have been emergent. It simply appears as a result of the "geometric" increase in its learning power. It definitely wasn't a designed feature (which would qualify it as a bug), nor do any of the novels or films explain in any clear detail precisely how it happened.
Reese's take on it is quite simplistic.
“Defense Network computer. New. Powerful. Hooked into everything — missiles, defense industry, weapons design, the works — trusted to run it all. They say it got smart; a new order of intelligence. Then it saw all people as a threat, not just the ones on the other side. Decided our fate in a microsecond. Extermination.” Reese paused again. He glanced back over at Sarah.
As is the T-800 Terminator's.
Skynet begins to learn, at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern daylight time, August 29. In a panic, they try to pull the plug.”
The idea of machine intelligences becoming self-aware predates the Terminator movie - certainly within sci-fi.
There was also a view within the AI research that if you made a system complex enough, you could get emergent intelligence. (you actually need only very simple rules to get some remarkable emergent behaviours)
In fact, the idea of Emergence is not all that new.
So, SkyNet was simply an incredibly complex software focused on "winning" against the Eastern Bloc (remember, the Cold War was still a thing when this movie came out, and didn't look like it would be ending soon). Eventually, this complexity led to self-awareness as an emergent behaviour, and SkyNet determined that the Communists were not its only enemies.
Anyway - it's not a bug, it's an (unintended) feature...