Car companies doesn't make their own airbags, they buy them from Autoliv. They don't make their own brakes, they buy them from Brembo. They buy transmissions from ZF, tires from Michelin, ECUs from Bosch, etc. Why should car manufacturers develop their own self driving technology instead of letting others, like Bosch [1] or Veoneer [2], do that and buy it from them? Spread the investment over more cars, it makes sense.
[1] https://www.bosch-mobility-solutions.com/
[2] https://www.veoneer.com/