The portrayal captures a larger cultural narrative about AI and humanity’s apprehension about impending technological dangers.