If some formulas can bring huge economic benefits, it is better to protect them as technical secrets. Because you have applied for a patent, the formula will be made public. If people know your formula, they may use your formula. Although it will infringe on your rights and you will take it to court, you have to prove all aspects of his infringement. It is still very troublesome to defend your rights. What's more, the market will be divided, which will lead to the loss of your market visibility, reputation, etc. loss.
The above just explains why some companies choose to use technical secrets to maintain exclusivity. As for whether Pepsi-Cola has applied for a patent, you can enter Pepsi-Cola into the applicant (patentee) on the patent search website to search whether Pepsi-Cola has a patent. Of course, it is limited to those disclosed before the day of the search.