I hope I'm allowed to answer here... anyway!
The Rock Pigeon's natural habitat is cliff faces, so as you can imagine - city buildings are a perfect substitute!
Cities are also a great source of food for the birds. Given the option of pigeons or rats to eat it... I'd definitely choose pigeons!
As for when - the Romans had their columbarium (a building designed for pigeons to roost in, so the young could be taken and eaten) before the time of Pliny's Naturalis Historia - so city pigeons have been around for a while!