Apple wasn't interested in being an "also make" in EVs, they were speculating on the future of self-driving cars making passenger automobiles heavily software dependent, with potential for transport as a service models emerging. Musk tried to sell Cook the Tesla business around the time he had to put his own fortune on the line to stop Tesla going insolvent. Cook blanked him apparently.For $10bn he could have pretty much purchased Rivian, NIO or Lucid outright, had working market delivered vehicles they could then use to innovate from there. Including manufacturing. It's basic stuff, $10bn effectively written off for a product which was never core to the business when they could have partnered or acquired is getting a career ending event for nearly any other company on the planet.
Tesla's efforts at fully autonomous driving and no doubt Apple's own efforts have shown it's much more of a challenge than some believed it to be. they got out of the game b/c they couldn't leverage the Apple ecosystem into transport, for now.