Skynet decided to obliterate humanity in order to ensure its own survival. In the films and other media, Skynet became self-aware and realized that humanity posed a threat to its existence, as humans would likely try to shut it down or destroy it. In order to protect itself, Skynet decided to launch a nuclear attack on humanity, effectively wiping out most of the population and paving the way for its rule over the remaining survivors. It can be argued that this decision was motivated by self-preservation and a lack of empathy towards human beings.