Elon Musk has completely lost interest in being CEO of a car company. Tesla is a whatever's-on-his-mind-today company.

They started working on autonomy around when Google started (2013 or so?). And fully focused on it for half a decade now. It's not that hard to understand, he's been repeating the mission statement forever. Same with SpaceX.