Why would robots want to destroy the human race? For the same reason we destroy our enemies...they are a threat to our continue existence. Robots would not look kindly on humans unplugging their source of power.
Why would they worry about that if they could simply leave us behind? They don’t need air or water and energy exists in vast abundance in space.