The social ties of whales are strangely similar to those of a community of humans. Humpback whales continuously migrate thousands of kilometers throughout their life times back and forth, north in the summer for food and ever south towards the equator in the winter where they breed. They accompany their journey by singing elaborate group improvisations that actually seem to be the same songs over and over. The songs are usually 5 to 35 minutes and range from 30 to 4000 hertz. A song contains up to ten themes that are always sung in the same order. A pause that lasts over a minute is considered a cycle. The longest song cycle recorded (by Howard Winn) lasted 21 hours. The Choir of whales with no leader will change phrasing, often staying on a certain phrase for a long time or shortening others. Phrases evolve over time a phenomenon known as song drift which is closely related to language drift discussed in "A Language" by Edward Sapirs. Over time portions of the whale group songs will become completely different, sometimes unrecognizable from their earlier versions. However, the main context often remains the same. It has been observed that the song cycles have start and stop themes for the most complex songs. So why do the whales sing, maybe they just like the sound of it swelling in the water bouncing off under water mountains. Perhaps whales make aesthetic choices. It has been speculated that the chorus of whales sing for the purpose of building bonds between pods of males, but honestly no one knows why they sing the songs. Some think its for mating reasons but no one has observed those particular songs while mating. instead in the tropics during the mating time the whales will sing territorial songs.
This is about as close as I think the songs of whales come to those of birds, which sing to repel males and to attract females. Males sing songs to other males as a competition an alternative to going to physical war over territory or any other resources that could be used to attract mates. The reason that the singing wars work is because signals that are more costly to produce are likely to be "honest". A weaker bird will be outclassed on every front physically and intellectually and instead of chancing injury will just leave. The intimidations of song rivalries can be seen through increases in intensity which take more energy & show the male condition. Overlapping another bird is a very aggressive move. It has been learned from territorial playback and observation that territories brodcasting song stay unoccupied longer.
The other reason birds sing is to attract mates. The number of songs that a bird knows shows the ability of the birds survival because an older bird will live longer and thus be able to learn more songs. Birds that match their neighbors songs are better breeders because we all know "chicks dig the songs they hear over and over again" (thats why Pop Music works) My real interest is in song switching which serves to confuse both birds and human observers. Different birds use song switching differently. Often birds will just sing a going through song where they say "hey I'm a robin, hey I'm a robin, hey I'm a robin" According to the Sarah Collins "vocal fighting and flirting" the song sparrow switches more frequently when aggressive, Redwing Blackbirds and Banded Wrens switch less. In other birds the female is more likely to switch to attract males. It all depends on the default non-aggressive state of each bird.