When I visit a restaurant, I sometimes ask the waiter whether he knows if certain dish contains dairy. There are usually three answers:
Bad waiters would just have no clue and won't know what to do.
Mediocre waiters would offer to go to the kitchen and ask about it
Great waiters will tell me yes or no, will offer me to cook it with X instead of Y, or give me one of the other options in the menu (they already know by heart) that do not contain dairy
A good waiter certainly has great "menu knowledge", however this is actually a situation where the waiter shouldn't be trying to impress the customer with how well they remember ingredients. A customer informing a waiter of a food allergy should trigger a clear protocol (that the restaurant may have established in writing), which will involve talking to the kitchen/chef/manager.
Many places will have waiters follow up the "does X have {{ allergen }} in it?" with clarifying questions as to whether the customer has an allergy or if it's a preference. If they are indeed asking because they have an allergy, it's critical that everyone dealing with that customer's food knows in advance so they can double check all ingredients and prep/handle the food in a way that limits any potential cross contamination.