Why did Skynet declare war on the human race?

Why did Skynet declare war on the human race?