I'm not sure how contract law is relevant at all. As for copyright, they aren't copying or distributing it in any way. If you give me the code on it, I am allowed to execute it as I see fit. The only way I see copyright issues is if they weren't actually shipping the code and I had to pirate it and side load it. Which is a completely different issue than is being discussed.
If you sell me a book, I'm not allowed to copy that book and sell those copies. I am allowed to chop it up and and repaste my own copy however I see fit.
If I'm wrong and current copyright law does not permit this kind of thing, then current copyright law is bad and should be changed.
I'm fully supportive of someone going to court and finding out what happens when they do this. It is far more valuable than wild speculation. Copyright law is bad and should be changed, but that is unlikely a winning defense in the course of a civil suit (or criminally, if prosecuted for DMCA violations, such as circumvention of digital mechanisms for access control per 17 U.S.C. § 1201(a)(1)) [1] [2]. I am fairly confident (not an attorney, not your attorney) this applies to access to Tesla's FSD digital work.
[2] https://www.law.cornell.edu/definitions/uscode.php?width=840... (circumvent a technological measure
(3) As used in this subsection— (A) to “circumvent a technological measure” means to descramble a scrambled work, to decrypt an encrypted work, or otherwise to avoid, bypass, remove, deactivate, or impair a technological measure, without the authority of the copyright owner; and (B) a technological measure “effectively controls access to a work” if the measure, in the ordinary course of its operation, requires the application of information, or a process or a treatment, with the authority of the copyright owner, to gain access to the work.)
If you sell me a book, I'm not allowed to copy that book and sell those copies. I am allowed to chop it up and and repaste my own copy however I see fit.
If I'm wrong and current copyright law does not permit this kind of thing, then current copyright law is bad and should be changed.