Why do sauces thicken as they cool?
As they cool, many proteins go from long, flexible and un-entangled to short, rigid, and entangled.  For all of those, the basic thickening is due to protein structure. The proteins in question are


puddings - albumin (egg) (Note: egg is complicated, and can be made to entangle at many temperatures, e.g. souffles, meringues)
white sauces, gravy - gluten (flour)
jello - gelatin (from a variety of sources, could be either animal or vegetable)


Similar protein processes also explain the various cooking levels of meat (rare, medium rare, medium, etc.), and the various ways of cooking eggs.