Elon Musk, founder of SpaceX and co-founder of Tesla Motors & SpaceX, said during his interview with Wired Magazine:
“I can’t tell you much. We have essentially no patents in SpaceX. Our primary long-term competition is in China—if we published patents, it would be farcical, because the Chinese would just use them as a recipe book.”
The ultimate goals of patent and trade secret are the same: to protect invention. They go about it in completely different ways.
Patent is, by definition, an exercise in disclosure. The deal the inventor strikes with the government which issues the patent is that s/he can have a monopoly on the invention, but only if s/he discloses the best mode to make and use the invention, and only for a limited period of time.
Trade secret is, by definition, an exercise in secrecy. No disclosure is made, no governmental grant of permission occurs, but the inventor can keep the trade secret for as long as s/he can keep the secret. Some trade secrets have lasted for hundreds of years.
So yes, the patent system in a big repository for the dissemination of information about inventions. It’s designed to be that because sharing the information through the patent system (so the theory goes) sparks further invention. In the US (I’ll get to China in a minute), the grant of patent rights expires after really a very short time, enabling others to glom onto the invention and make it cheaper, though not necessarily better, than does the original rightsholder (generic drugs are a prime example of this phenomenon).
China is notorious for its lack of respect for intellectual property in general. Although they are trying to change this, the idea that someone can own a product of the human mind is simply completely foreign to that culture. Therefore, the Tesla/SpaceX decision not to patent its invention, but to protect the invention through trade secret, is a strategic and conscious decision. They want to protect their invention from prying eyes and infringers. They do run the risk of loss of the secrets through disclosure or independent invention, but they have done their risk/benefit analysis and made their business decision. It may be the right decision for them, it may not be; that will be determined by time.