In order to attract a female to mate with him, a male bird has to obtain and defend a territory. This territory will help determine his breeding success by providing him, and his mate, with food.
Males claim a territory by singing in it, which tells other males to stay away.
They leave gaps in their song to listen to replies, so they can discover where any rivals are and focus their defensive efforts on strangers looking to take over the territory. Some species, such as great tits and chaffinches, have a large repertoire of choruses to convince other males that there are a number of birds in the area and that all the territory is spoken for. The second reason for the dawn chorus is to advertise for a mate. When doing this, males sing songs that are longer and more complex than the repetitive ones used for territorial defence. Singing is an honest indication to a female of the males quality and fitness because it is an energy intensive activity.