XCode is free in part because it is expected that Apple will make money off of it indirectly. Even if you don't pay for XCode itself, Apple can make money:
- because you build a Mac app that attracts people to the Mac
- because you build an iOS app that attracts people to iOS
- because you build a paid Mac or iOS app that you sell through the app store, and they take a cut
Beyond that, if you want to package an app for the app store, as far as I understand, you have to use XCode. So Apple is saying, if you want to make money building for our platform, then generally we'll get money too, and you have to use our IDE for at least part of the process. At that point, it's understandable to expect some quality out of the IDE, I think.
This is a fair point; it makes business sense from Apple's point of view to give it away for free, however the same reasoning didn't stop Microsoft and IBM in the 80's/90's to charge developers $3000 for the OS/2 SDK.
In response to your second point, I would like to point out that submitting to the App Store is the only part of the process that has to be done in Xcode, which is a very tiny part of the app development cycle.
Beyond that, if you want to package an app for the app store, as far as I understand, you have to use XCode. So Apple is saying, if you want to make money building for our platform, then generally we'll get money too, and you have to use our IDE for at least part of the process. At that point, it's understandable to expect some quality out of the IDE, I think.