The trick about autopilots (especially those in smaller aircraft) is that they operate almost exclusively based on information about their own state. Wing levelers just operate to keep the wings parallel to the ground, using information from a gyro. Direction keepers keep you on a particular heading, as determined by a gyro (which is corrected by a magnetometer). Even landing systems rely on radio signals being beamed at them.
The big exception to this is collision avoidance systems which use a radar combined with transponders; and is limited to fairly expensive aircraft as a result.
Autonomous cars have to start with radar-based collision avoidance simply to provide "smart" cruise control, and work outwards with lane detection for lane keeping, lidar and prediction for external body collision avoidance (deer, children, bikers), and so forth.
Aircraft autopilot is dead simple in comparison, and still has its share of failures. And speaking of failures, the other advantage of aircraft is that in the case of failure (in any phase of the flight other than takeoff/landing), pilots have tens of seconds to take over and hours each year of deliberate practice at flying compromised aircraft. Drivers, on the other hand, will be lucky to have a single second to realize their car isn't going to stop when they expect it to.