Because Chris Lattner and the other developers building Swift fought hard to do so, knowing that the language could only really succeed if it was open source. The natural inclination of all of Apple's higher leadership is to keep things secret and internal, not because it's better, but because it's Apple's way, as far back as the original Macintosh.
Because their leadership doesn't want to, despite the huge benefit it would bring to the platforms.
Darwin isn't truly open source; you cannot make PRs or help improve it. It's source available because it has to be, due to the licensing of various system components. Apple is quite happy to keep any aspect of it closed that they can.
Licensing failed to help Apple in the 90's because it was too little too late, but like licensing, open source multiplies the development effort that can be spent on a platform. When Steve Jobs ended the licensing program upon his return to Apple, his fundamental assumption was that Apple's unique hardware and software was so much stronger than the competition that it was an advantage for Apple. And there's some wisdom to that belief for someone who approaches hardware development as an opportunity for revolution. But that's not what we're talking about here.
Over dramatic much? Only the GNU crowd hates Apple. The rest of us are just Swift developers who would like to fix the bugs in and add the missing features to the tools and frameworks we use everyday. Who see the excruciatingly slow crawl of a yearly release cycle and would like to get out and push. Who just want to make the best platform possible, if only we were allowed.
This assumes Apple's reasoning is unique. It isn't. And it certainly isn't as unique as it's leadership likes to think. Complete hardware secrecy is possible while still making nearly all of the software in the open. And now that SwiftUI is in the open, there's little value in keeping it closed. It just limits the work that can be done on the framework to what effort Apple is willing to spend internally. We can see the entire industry moving further into the open. Even Microsoft has realized the huge gains in ecosystem and community only made possible by operating in the open, while still allowing themselves to build value in secret.
So I think it's important to keep expressing, as a community, what we find valuable in open source projects, and the benefits awaiting the community and platforms should Apple embrace it further.