I remember as a kid a fellow across our backs (back lane between terraced council houses) kept pigeons. Not sure if he raced them, he just let them out every evening and they would fly around and around in a sort of group formation flying, very impressive at the time, and then go back into the loft in his garden (if that makes sense) when they were done.
I always wondered as a kid why they didn't just shoot off to freedom once they were out, but they dutifully returned after their fly about. I guess a roof over your head, regular food and a desire to stay with the crowd might seem better than the madness of survival in the wild.
However what little experience I've had with pigeons leads me to believe they don't think like that, yet to meet a pigeon that would give Albert Einstein a hard time in a quiz.