1) choosing that particular eMMC, likely not something specced for very high write endurance, or not speccing a larger amount of flash to spread the write endurance out over a period of up to 20, 25 years.
2) linux/operating system/software engineering implementation, for a certain volume of MB of writes per day, that would be known to wear out the flash write endurance over a short number of years. possibly a result of the software team not communicating properly with the hardware team. the software team very well may have been operating in a vacuum of assuming that they could do whatever they wanted within the CPU, I/O, RAM, and disk space limits of the architecture, and weren't even thinking at all of the consequences of their logging setup.
3) not making that a socketed/removable part.
4) asking the owners to pay for the replacement due to tesla's own screwup.