Elon himself explained this years ago in the 60 minutes interview.
Replace "mass-produced car" with whatever is being discussed and it still holds true.
Basically if he's giving you a date about a thing he hasn't actually ever done, it's just a guess and likely wrong. FSD for example- or terascaling the next-gen batteries. He's never done it (and nobody has) so he legit does not KNOW when it'll be done- how could he? So he throws out a date but it's usually...overly optimistic. He is good at recognizing hard problems, but often thinks they'll be easier/faster to fix than they turn out to be.
In contrast- If he's giving you a date on a thing he HAS done (building a car factory for example) then he probably is going to offer a solid timeline (see Shanghai being on time or ahead of schedule, and Austin and Berlin being that way too.).
And worth noting- each later iteration of "thing he HAS done" generally turns out notably superior to the last one in addition to being completed faster.