According to Audubon Magazine, birds flock as a way of avoiding predators, and it allows them to take advantage of the currents in the air in the most efficient manner. Birds also flock as a migration pattern and they may form flocks when foraging for food.
Some types of birds may form mating flocks, which are called leks. The males in the group will show off their plumage in an attempt to attract a mate for breeding. When males perform this maneuver in flocks they can show off to more females than if they were in a small group, so their chances of finding a mate increases.
Several species of birds form communal flocks to assist in caring for their young. These groups are called rookeries, and members can take advantage of the large numbers that serve as protection of their young from predators.
While there are a variety of benefits for birds to flock in large numbers, there are a few disadvantages including increased visibility, competition and a higher risk of disease. Groups of birds are more likely to attract the attention of predators than a few birds do. This can cause a constant threat to members of the flock. Members of large flocks may have to compete with one another for food in areas where it is scarce, and when a variety of birds stay close together they run the risk of spreading disease, which can often wipe out an entire flock.