Lens hoods keep front elements from being struck by light coming in at angles that might flare the lens; to keep overly bright, large sources of light (cloud-light, sky-light, reflected light off of large buildings or lakes, the ocean,etc.) from lowering overall image contrast. Lens hoods also act as front element protectors, from fingers, branches, and other cameras worn simultaneously. Lens hoods--especially on BIG,heavy,long and very,very expensive lenses also act as impact absorbing protective devices. The modern long telephoto lenses have quite large polycarbonate or graphite lens hood that offer a little bit of flexion, so that __if__ a big, 7- to 15-pound lens hits a solid surface, or a thrown object hits the front, there's a good chance that the lens hood will absorb much of the impact force.
When a lens or camera & lens combo is dropped, or falls over on a tripod or a monopod, the weight-forward balance will very often result in a lens-first impact with the ground or concrete. A lens hood of the modern style can often keep the filter thread area un-bent, and can protect the front element or the front protective glass component that has become the norm on many big-glass telephotos.
It seems that from anecdotal evidence, the new polycarbonate petal lens hoods the camera makers have been making the last 16,17 years have had some types of drop-tests done on them, so that the hood can take a camera&lens drop, and the mooring system on the hood is juuuust strong enough to absorb impact to the point where the hood will often wrench off, or pop off, but the lens mount on the camera and the mount o the lens will not be ruined.
Same idea as the original Rubbermaid home trash cans, versus old-style, lightweight steel trash cans.