I'm not sure if this applies to Xcode, but at least with Coda, even if you purchase it outside the App Store, it has an 'Installed' label and presumably gets updated through the App Store as well.
The app store can detect I'd apps are installed (through their bundle identifiers) to prevent you from accidentally buying them twice, but it will not update apps that haven't been downloaded through the store.
I believe that was considered a bug in the App store.