The colour of a European wood in autumn is predominantly yellow. There are relatively few European trees which have red leaves in autumn. Evolutionary biologists have long pondered the phenomenon of the changing colours of autumn leaves.
It's possible that the red pigments are manufactured in the leaf as a side-effect of something else that's happening at this time. But it could also be that the red pigment is somehow adaptive: that red autumn leaves are a product of natural selection, because they perform a function which offers some advantage to the tree.