In the case of coca cola, because use of coca leaves is highly regulated due to the fact that they also contain cocaine. There is a YouTuber who claims to have reverse engineered Coca-Cola, but he had to use tea-tree oil instead of actual coca leaf extract.

Here's EFF on reverse engineering and the law: https://www.eff.org/issues/coders/reverse-engineering-faq

Historically a lot of competition in physical products was very much reverse engineering. Because you can buy them without signing your rights away. That's why companies are keen on patents and click-through agreements.

If you look at how "clean room" processes work, they are actually a form of reverse engineering. Also clean room technique exists to avoid your new implementation infringing copyright, not trade secrets.