They demonstrate their superiority.
According to historical data, wild roosters were domesticated as sacred beings in Ancient India in the 3rd–2nd millennia BC. Their loud crowing, which heralded the beginning of a new day, was the reason for their domestication, and in ancient Europe, chicken meat and eggs began to be consumed.
In the wild, each group of birds occupies a strictly defined territory where they search for food, breed, and defend their holdings from their peers. However, fierce battles, injuries, and especially the death of males fighting for their territories negatively affect the population and the species as a whole.
Therefore, nature has provided that roosters, known for their aggressiveness, should strive to capture and defend territory, using peaceful methods whenever possible — intimidating rivals with loud crowing. A rooster's crow serves as a signal of who is in charge here, leaving neighboring rivals in no doubt that he is the master of his territory and the leader of his 'harem.'
Thus, the rooster's crow represents a territorial acoustic signal that plays an important role in bird communication, especially among wild species. Nevertheless, domestic roosters also continue to notify the entire area of their 'rights' to the yard with the chicken coop. Crowing is a kind of challenge to other roosters, to which they may respond. If the crowing comes from a subordinate rooster, the leader simply attacks him.