Who "learned that"? The public (devs, etc) already knew and wanted that.
Companies however, have been patenting their languages and techniques since OS/360 or earlier (IBM, Oracle, MS, Google, and so on). So it's not as if "Apple has gone insane" at all, all big players do it. And not because they want to sue either -- you also need them to not be sued yourself oftentimes... (if Apple doesn't patent e.g. their "Optionals chaining" technique mentioning, what's to stop e.g. Oracle doing it and suing them?)