What part of it is confidential? Its existence? Obviously not. The fact that it uses SLAM? Not confidential, of course it does. That a person was transferred from that to the Vision Pro? Probably also on their linkedin page.
Nothing that OP described this person as saying sounds "stupid" or confidential. Sure, maybe they also said something that was confidential in addition to what was described. Maybe they also insulted your mother. We don't know.
Is that an official, Apple-specific policy written down somewhere? That doesn't seem right, and doesn't match other similar companies.
I've known people at Facebook and Microsoft who were working on upcoming not-yet-released products and were free to talk about the products and their roles on them. These people, much like the person we're discussing, worked on upcoming projects which had already been publicly announced.
Of course publicly discussing a confidential project that no one knows about could get someone fired, but that's not the scenario we're talking about.
Apple never announced a project to build a car. Nor did they announce the cancellation of a project to build a car.
Reporters reported on internal communications and noteworthy patterns in who was hired.
Apple does not pre-announce products by more than 6-9 months, and only that in cases where developer support is needed at launch.
More generally, Apple is notorious for having policies around new product secrecy that are vastly more elaborate than other tech companies. Using Microsoft and Meta as comps seems like a bad idea.