Usually, the revealing of trade secrets would cause a loss to the party who is keeping the secret. For example to reveal the ingredients to say a popular soda drink would damage their business since the competition would develop their own version. There would be a substantial monetary loss.
Then there is the ethical behavior. Jews seen as revealing trade secrets would be considered unethical and there would be issues of chillul Hashem.
Depending on the context, it might be damaging to all Jews. For example if the Rabbi who is involved in certifying that Coca Cola is Kosher were to reveal the ingredients of Coca Cola, he would not only be doing something unethical, and cause a substantial loss to the company, it would also damage the reputability of Kashrus Organizations and businesses would see that Jews and their Kashrus are not reliable, honest individuals. This would cause a massive chillul Hashem, but also delegitimize the kashrus industry.
The Talmudic discussion here, is an entirely different scenario - where the issue is the betterment of society as a whole. Would it be unethical to reveal the way Teva Pharmaceuticals makes a certain medicine, thus enabling a generic compound to be made, thus providing a cheaper alternative for the drug, and thus would be a betterment to the community as a whole. This would ostensibly save lives. There are a number of issues here. Firstly the healing of Rebbi Yochanan was conditional on revealing the remedy. In the case of Teva, you're entitled to the drug and it is non-conditional, provided the doctor allows it. It seems therefore that Rebbi Yochanan's agreement was not an agreement in the true sense because she knew he would reveal it prior to the treatment, and made him swear otherwise. He needed treatment and it seems it was illegitimate to withhold that information. In the case of Teva, there is no condition and they don't assume you will reveal their trade secret. Anyone in their employment would probably sign a non-disclosure agreement which effectively means that legally you'll be obligated not to reveal anything with stiff penalties otherwise. Halachically, this agreement would probably be binding. (see Dina d'Malchusa Dina - Shulchan Aruch Choshen Mishpat, 369:6-11)
This Article discusses your question from a perspective of contractual law and the effects of that in general as well as the Halachic ramifications.