In the exchange between the Lord and Satan we learn that the created beings, both "good and bad" angels do only what the Lord allows them to do. Thus, although Satan was the instrument of Job's torment, ultimately the Lord was responsible for what happened to Job.