I've said this before, but if we look critically, we would realize copyright is an inappropriate legal protection mechanism for software. Indeed, copyright protection for software is a historical hack because people didn’t want to figure out an appropriate legal framework from scratch. You “wrote” books, you "wrote" code, let’s shoehorn software into copyright and go get lunch!
However this completely overlooks the fact that the true value of software, and theoretically what we should protect, is not the code, but the functionality it provides. Copyright explicitly does not cover functional elements -- that is the realm of patents -- and really only covers code to the extent that it has "expressive elements." Technical creativity (novel algorithms, data structures, architecture etc.) is expressly excluded.
One non-obvious and absurd implication of this is that any code that can be shown to be purely dictated by technical constraints is not protected -- https://en.wikipedia.org/wiki/Abstraction%E2%80%93filtration... via https://en.wikipedia.org/wiki/Computer_Associates_Internatio.... -- yet a simple rewrite using equivalent code constructs, like using a while-loop instead of a for-loop, can be enough to keep a snippet of code from infringing the original. (I'm oversimplifying of course, but principally this is how the law is.)
If you look back at significant copyright-related cases for software now (e.g. CA vs Altai above or Oracle vs Google), you'll realize they have twisted themselves into knots trying to apply laws intended for expressive creativity to issues that were essentially about technical creativity.
So copyright covers pretty much the literal code, and the compiled software as a "derivative work", and nothing more. Things only happened to work so far because reverse engineering and re-implementation was expensive.
But as comments in this thread are pointing it out, AI is making it very stark that the code itself matters very little. We're just now realizing how ineffective copyright has always been for code.
I have no hopes that we will figure out an appropriate IP framework for software, so I expect people will move towards other things like patents, trade secrets and trademarks. Which have their own problems, but at least they already exist and are more suitable than copyright, especially in the age of AI.