Hah, this triggers my pet peeve about IP for software: Copyright for code is a category error.
Copyright very explicitly does NOT cover functional aspects, only creative expression. But the value of software is not in the expressive aspects of the code that generates it, the value is in the functionality it provides. And this is the exact thing that copyright does NOT protect!
Like, literally, we're protecting the fact that we used a for-loop instead of a while-loop to do a useful thing, not the useful thing itself. This is why rewriting enough code is sufficient to bypass all copyright protection, as the recent AI rewrites have shown.
This was always a huge legislative hack, rightfully controversial at the time it happened, but legislators didn't want to bother figuring out a proper IP regime for software -- maybe something between copyright and patents -- so they shoehorned code into copyright.
Google v Oracle was trivial to decide, but it got decided the wrong way. Because it became a trial around laws based on an ill-founded legislative hack and the decades of flawed case-law it spawned. Stepping back, it is very clear that Sun spent billions making a very useful thing and Google co-opted it for its own uses without recompense because they bet (correctly) that they could legally get away with it.
It is somewhat analogous to what the AI companies are doing with all the code and data out there. Funny that people are unhappy about THAT but cheered when Google did it to Sun / Oracle. I wonder what changed ;-)