Some do. Resting allows time for flavors to reach out across the dish. Marinade and Deviled eggs can be prime examples. When making either I will add garlic. You really don't want garlic "bubbles" of taste as they will be extremely potent and make you feel like your taste buds are traveling through a mine field. Resting for a night or two fixes this and evens the flavor out through the dish.
I will say this isn't the best for everything though. Picking up the Deviled eggs idea again there are a couple things like bacon that I will leave out until the day of eating. Bacon will jump in front, hide for a moment, and then come back at the end. Very cool effect, and there are several recipes that will do this for several dishes, but if left to rest for long the flavors will mesh and be constant.
There are also several food that it doesn't matter in. Pizza is a prime example. The oil from the cheese and the grease from the pepperoni come out and allows flavors to permeate everything on the first cooking. Everything after that (for the most part) is just reheating.