During the Cold War you started to see drones being used for reconnaissance. The US had the Ryan Model 147 and D-21. Once computers became significantly advanced you started seeing an explosion of different applications. The tomahawk missile is extensively programmable, allowing the user to give it a flight course consisting of a number of waypoints, and digital images along its intended path. It would then compare those images to what it sees on the route and use that for course corrections, ensuring extreme accuracy against targets a thousand miles away in a time before GPS. (fun fact: during the Gulf War, the Navy had to plan their Tomahawk stikes to go through the Southeastern portion of Iraq instead of a more direct route because they could use the mountains and hills for course corrections, while the direct route went over relatively featureless desert). In the late 1980s Israel would employ loitering munitions. Essentially these were suicide drones intended to take out enemy radars. It would loiter above for hours until detecting an enemy radar and then dive. There were also decoy drones. These didn't have a warhead, they were intended to simply fly around acting as bait. Some decoys are fitted with radar reflectors to make them appear larger on radar than they really are, essentially the opposite of stealth aircraft.
Autonomous weapons have been around for a long time and aren't going anywhere. Frankly, I think this is probably better in terms of reducing civilian casualties. I'd rather have soldiers use a precision guided weapon like this than calling in mortars or artillery.