The GNU toolchain (or whatever) is licensed to run on any hardware that you can possibly use it on, which will often be cheaper and more accessible than a Mac. Xcode requires Mac OS, which is only licensed for use on Apple hardware.
You can buy used Apple hardware fairly cheaply, but I think that post still has a point about relative cost.