The advantages of carbon compared to e.g. aluminium are as follows:
Carbon is significantly lighter with almost the same surface area.
By manufacturing the material in layers, certain areas, e.g. of a frame, can be made stronger and thus stiffer. Other areas, however, can be made significantly thinner and even lighter. Thus, a component can be made significantly stiffer in the required areas and sufficiently elastic in others.
Compared to aluminium, carbon has a better fatigue strength.
Carbon does not rust or corrode.