Now, now... Apple has been "giving away" operating system and software development software for decades.
In the case of Xcode, I presume it's what Apple uses internally anyway, so giving it away is an incentive for developers to work on Apple gear. They'd be insane to charge for it.
Microsoft gives away Visual Studio now too. I always liked it better than Xcode anyway.
Then again it may have been Objective-C that I really didn’t like.
Objective-C could make a rose smell like a turd.