And, interestingly, doing so still results in legal protection (trade secrets) -- though the extent and nature differs from patents. I'm not a lawyer, but keeping information as a trade secret seriously limits your legal recourse. But, for a company like Tesla that doesn't seem all that interested in suing competitors, it could make a lot of sense. OTOH, if it ever came out that this was their practice then it would make Tesla a target for serious espionage.
The thing is, prior art can be used to invalidate patents. If Tesla tried to submarine their inventions through not filing for patent protection and keeping them as trade secrets, if someone else tried to patent it they could present their own prior art. Tesla would not be able to secure a patent themselves (I believe the US was the last to move to first-to-file), but neither could anyone else.