One example of such a case would be the Coca-Cola company. Coke has never patented its formula or recipe for its most famous drink. Instead, it has kept the recipe as a trade secret for over 100 years. The most likely reason for this is that it does not want its recipe to be copied.
If Coke were to have patented its recipe, the patent would have run out long ago. Patents taken out in the United States today are only in force for 20 years. After that time, the patent lapses and the thing that is patented is in the public domain. This would have been a very bad thing for Coke. A mere 20 years after it had patented its recipe, that recipe would have been open for anyone to copy. Other companies could potentially brew the exact same drink and badly dilute the market that Coke had built up. For this reason, it is better for Coke to keep the recipe as a trade secret. It will, in this case, never be legally exposed to use by other firms.