In any type of endurance competition or record attempt you need to eat while racing. Even in sports that make eating and drinking difficult, such as swimming, endurance racers eat during the race. For swimming this only applies to long events that last several hours. Events such as the English Channel swim or the swim around Manhattan Island.
Nobody needs to eat during an Ironman swim, but some do. Not surprisingly this mostly happens in events with a two-loop swim course that includes a short jog on the beach, eg. Ironman Florida, Ironman Coeur d'Alene, the Great Floridian, and others.
Eating on the bike is quite easy and most cyclists eat candy bars when riding more than 50 miles. Some eat on every ride, irrespective of how short it is. Though that makes very little sense and century rides can be completed without much food intake while underway. However, most century organizers have taken to providing ample food to attract customers. Some events have turned into "gourmet" parties.
More people have trouble eating while running and that is why many triathletes try to eat more than they need on the bike, so they have extra energy for the run. Marathoners used to eat very little if at all, but the widespread availability of GU and other gel products has changed all that. Gels are now so common that many marathons refuse provide them any longer because residents along the course complain of widespread littering from gel packages.
I suspect that most eating while racing is done for comfort, to take a little break, or as a distraction. It is rarely needed and most people do not go hard enough to fully deplete their glycogen reserves. When it comes to fat, even lean adults have enough storage to run several thousand miles. In any case, few go hard enough during the run to need anything but endogenous free fatty acids.
Excess eating and drinking is to blame for a lot of DNF's -did not finish's-, and upset stomachs. Ironically enough most victims think the remedy is to eat and drink more. Many also seem convinced that an ironman event cannot be completed without food intake. It is very clear however, that this is false.
For sure, those taking in excess of 15 hours do not need to eat to finish. Yet they are the ones most likely to do so. First of all, because people rarely go that long without food anymore. Second, because it feels good to take a break and eat something. Third because many think they can make up for lack of training by eating more.
Much has been said about what one needs to eat during a race and special diets abound. For years, liquid-only diets with no residue were favorites among RAAM riders and other ultra-athletes. Getting used to an all liquid diet is as hard if not harder than getting used to eating real food while running.
I recommend that you eat and drink as little as is necessary to complete the race. This leads to faster finishes, less GI problems, less potty breaks, and generally improved well-being.
For short races at high intensity, all one really needs is some readily-available carbohydrate. For events that take a few hours, it is better to add in some fat. Many people shy away from meat and prefer peanut butter instead. The type of fat you eat does not really matter as long as you add some in. The longer the event, the more your intake should resemble everyday meals, and for any event lasting longer than 24 hours, your food intake should be similar to what you normally eat, only more.
As for post-event intake, remember that most of it is an excuse to eat more than you need. There is no need for special potions, or even for rapid refueling. Unless you have another race the next day, you can take your time and leisurely enjoy your chocolate milk after your shower.