That was a Musk problem. His two lead manufacturing execs quit when he wanted the plant automation installed without the usual factory testing, to cut the time to production in half. It didn't work. For a while, Tesla Fremont had a huge work force working in tents in the parking lot. Cost per car went up and quality went down, but cars came out.
Tesla still seems to have quality problems, and never delivered the promised $30,000 car. Although BYD did.