They don’t have to. Recipes are considered as trade secrets, so, there is no compulsion on any restaurant, anywhere in the world, to disclose them. There are some restaurants, especially high end ones, that take pride in detailing every item on their menu. Even then, they don’t disclose the exact proportions of ingredients. They mask it by saying things like – a dash of semolina. a hint of spice, a dribble of sauce, a pinch of salt….never the exact measurement.
I think you wanted to ask – what if there’s an illegal substance in any of the recipes? That is taken care of by the other rules and regulations that restaurants across the world have to comply with. The authorities strictly prohibit usage of certain ingredients. It is a constantly updated list, which the restaurant owners get periodically (or download from the net). Anything on that list cannot be used….everything else (as long as they are food grade) can be used.