They are there to relax, warm in the sun, socialize and look for food opportunities.
Bird Control Solutions
There are several good solutions including Birdwire for pigeons and gulls, Tower-Guard for large species (ospreys, hawks, eagles, vultures, etc.), and Dura-Spike for pigeons and larger birds.
Considerations when Selecting Bird Repellent Products
On railings be sure to consider human interaction first.
If there is a roof overhead (like loading dock or warehouse ceiling), consider StealthNet. Small birds, like sparrows, can land on most of these devices. For them consider exclusion with StealthNet or Bird-Shock Flex-Track.