The main purpose for a bird's beak is to obtain food in the easiest and most effective way possible. Although some birds use their beaks to defend their territories, gather nesting materials or to weave a nest, the main purpose of the beak is to obtain food in the easiest and most effective way possible. That would be ridiculous. Rather, eagles, hawks and other raptors have strong,sharp, hooked beaks designed for tearing prey apart. A duck's bill, on the other hand is flattened with tooth-like edges for straining food out of water.
Hummingbirds feed on flower nectar and are attracted to red, tube-shaped flowers.
Consequently, they need a beak that can fit into those flowers. Humming bird beaks are long and slender and work like straws to suck nectar out of flowers. Seed-eating birds, such as cardinals, have short, thick beaks enabling them to break seeds open as easily as a nutcracker. Some birds have frail beaks that would break if they tried to crack open a hard seed. However they have big mouths that more than make up for their weak beaks.