This is an excellent question and one that I am often asked. In fact, it is one that has been researched. The truth is that alcohol used in food preparation does not always completely cook off when preparing some dishes. It is more likely to completely cook off in dishes where they actually light the alcohol on fire (i.e. - flambé). However, even then it may not completely cook off. In other foods that are baked, the alcohol is at least partially cooked off; it depends on how long the food item is actually cooked.
However, I am not sure this is really the crux of your question. I believe that your real question deals with risks. Again there is no simple answer. We know that alcoholics experience changes in brain chemistry with addiction to alcohol. Even small amounts of alcohol, if ingested, can trigger cravings for some people early in recovery. After a person has been sober for a while, the chemical reaction is not as strong and cravings are less likely. However, even then the taste of alcohol, even if cooked away, can be a factor that can lead to cravings.
Recovery is about lifestyle change. This is why most good treatment programs and professionals will recommend against drinking "non-alcoholic" beer, as this is not non-alcoholic as indicated on the bottles; it does contain very small amounts of alcohol. It is not enough to get intoxicated/ but can trigger some people.
Personally, I believe it is better to be safe than sorry, particularly in the first two years of recovery. I make only one exception to this. For many people, when they go to church, wine is used in Communion. Some churches provide grape juice as an option. I feel it is okay for an alcoholic who is in a good recovery program to receive Communion. They do not go to Communion to get a shot of wine; they go for forgiveness of sins. Even this can cause some alcoholics problems though, and they may be better off passing on the wine altogether in Communion.