For the same reason that ReactOS is helpful for you to build Windows applications: you can install the vendor's actual SDK on it (that'd be XCode here), without needing a license for the OS (which, in macOS's case, translates to "without needing to use Apple hardware.")
You know that there's entire data centers just running Mac Minis as VM hosts, in order to comply with Apple's OS licensing requirements? PureDarwin can just run on AWS.
Sure, running the XCode GUI needs Cocoa. But running xcodebuild doesn't, IIRC. It just needs some other, lower-level libs, ones that (reimplementations of) are in scope for PureDarwin.
Exactly. I don't think even Apple realizes what a burden it is that macOS isn't ever licensed to run on non-Apple hardware.
Self-service test VM provisioning, CI build/test environments, QA machine labs -- all of these would benefit immensely from not having to run on a farm of Mac Minis in order to stay compliant, while their Windows and Linux counterparts are able to run on large on-premise racked server environments with high-performance, high-availability storage and fast networking.
But then if Apple gets pissed off at that, they just change the XCode EULA to say "no non-Apple hardware, please". Actually, I would not at all be shocked if the XCode EULA already says that.
But, surely it is in their business interest to make life easy for developers, especially if doing so isn't undercutting their end-user-focused hardware business? A cloud server running PureDarwin+Xcode is not undercutting their end-user-focused hardware business, and while it might mean they sell slightly less hardware units for that cloud use case (not a core market for them), surely the added ease for their developer community (who develop apps which make those end-user-focused hardware units so attractive) more than makes up for that?
They've pretty well demonstrated through questionable deprecations and hoops they make people go through with each release that ease for the developer community is not what they optimize for, but I agree it would lead to better end user experience.
You know that there's entire data centers just running Mac Minis as VM hosts, in order to comply with Apple's OS licensing requirements? PureDarwin can just run on AWS.
Sure, running the XCode GUI needs Cocoa. But running xcodebuild doesn't, IIRC. It just needs some other, lower-level libs, ones that (reimplementations of) are in scope for PureDarwin.