Liability is a crucial area of the law that needs to evolve in response to software.
Liability with respect to the operation of physical products is well understood. There are private standards that insurance companies and courts are familiar with (for example: Underwriter Labs, NIST, NSF, ANSI). If your product passes the relevant standard, and a customer causes harm with the product, then you've got a great argument that your company should not be held liable for that harm.
Software licenses almost always just try to disclaim any and all liability entirely. "THIS SOFTWARE IS PROVIDED AS-IS AND IS NOT FIT FOR ANY PURPOSE"--anyone who has read a software license has probably seen language like that.
Then on top of that, software is increasingly networked with centralized services. Tesla's self-driving technology, as described so far, will be dependent on data made available over the network--like whether the radar return at a given location is a known billboard. So liability will attach to not just the car, not just the software, but also the real-time service run by Tesla.
Companies use liability as a major reason to restrict the rights of consumers. We need industry and legal frameworks to allocate liability for software and services like we have for physical goods.