They did that, in part, because they were subject of one of the first GPL enforcement actions, originally being unwilling to open source their objc GCC frontend. They being Nextstep at the time, but there's not a huge distinction these days.
Their investment in LLVM is very much an attempt to keep reproprietization on the table.
I absolutely believe that the investment in LLVM was justified to executives as a way to avoid GPL-licensed software, which Apple has long been allergic to.
But it should be noted that the GPL violation you refer to was in 1989. Put in context, that was ~16 years before they started investing in LLVM, and they have done so continuously for the past ~15 years.
It should also be noted that GCC was not suited technically, by design, for what Apple wanted out of a compiler at the time.
The JIT stuff they were doing with image filters for Core Image and Core Video and the IDE integration they were doing in Xcode could not be done in GCC at the time regardless of licensing without making massive changes, which would not have been accepted upstream.
GCC at the time was intentionally designed and implemented to make it hard to use parts of it independently, such as just using the parser to make a syntax tree for your IDE to use for highlighting or suggestions, or using the code generator in a JIT.
There had been suggestions and patches to make GCC more modular and separable, but they were rejected because being more modular would make it easier for proprietary software to interact with GCC components.
It was only after LLVM and clang started getting widespread use that GCC became more open to the idea of it becoming more flexible like LLVM.
Ultimately what the executives think is the reason is the real reason, as we saw from Oravle reproprietizing Solaris.
And yes, it was a while back that literally lawyers had to get involved in their blatant GPL violation in the compiler space. We absolutely get to judge a company on it's past actions.
I'd argue that Apple of today is closer to Nextstep than Apple of the same time frame. Like, it was literally Steve Jobs making that decision at the time to violate the GPL. The joke for the longest time was that Nextstep bought Apple for negative dollars because of how much senior leadership was carried over from nextstep.
It's not like it was some random startup they acquihired for a couple engineers.
The way you put it non copyleft licenses are just there for bait and switch. I don’t know any case where that happened where there was outside contributions.
Oracle reproprietized all of Solaris, including the outside contributions up to that point.
And I assume that Apple has support for these instructions this whole thread is about in their toolchains, so if that's the same version that's in xcode, reproprietization is already happening.
Leaving reproprietization on the table is the whole point of non-copyleft open source.
Their investment in LLVM is very much an attempt to keep reproprietization on the table.