Planes do detect other planes in proximity with the aptly-named proximity warning. Miles in advance. With beeps buzzes and autopilot disengagement. They are called ACAS.
Given that, to quote Wikipedia, while larger civil aircraft carry weather radar, sensitive anti-collision radar is rare in non-military aircraft, ACAS either does not detect planes that don't have a transponder, or need to rely on external systems to do so. Car autopilots can neither rely on other cars and pedestrians having transponders, nor on some central authority warning them when they're about to hit something. Thus they have to detect obstacles entirely on their own which requires a whole lot more sophistication than plane autopilots (which is also why planes have had autopilots for over 30 years and cars are just beginning to get them).