The more climbing, the lighter you want the bike to be. The faster and longer the course, the more aero you want it to be. Carbon typically wins out in both of these.
Also I’d guess at the pointy end of races, most riders are sponsored in some way and ride whatever their sponsor wants, so that might be a bad place too look for advice.