Well, Elon gambled that he could nearly fully automate the assembly line. Well, he was probably a decade too early because the technology we have is not sufficient at this time so he ended up having to hire all those humans to take place of robots.
Automation does not help if the operating software is actively sabotaged.