It not only teaches them to identify different foods, but also in this day and age of fast food and ready packed (or sometimes thrice packed), it teaches them that not all the food they eat comes ready prepared from the supermarket or a takeaway store.
I remember watching a Jamie Oliver programme a few years ago in which children where asked to identify fruit and vegetables.
Most of them didn't know the names of basic food such as cauliflower and broccoli. That's sad.
Cooking is like riding a bike — once learned it's a skill you have for life and it's so easy to teach even if you are a basic cook like me. It doesn't have to be fancy, it just has to be real food.
Sit your children or grandchildren up on the bench or get a stool for them to stand on and let them help while you prepare a meal. You never know, you might just inspire a lifelong love of cooking.