That's the way it's always worked. You read books to learn to code, then write code and you get paid for it, but that money doesn't trickle down to the writers of the books that taught you to code.
Except, the “books” in this case is the code/content that people might like to get paid for in the first place. Also, AI companies aren’t “buying the books”
Well then let Microsoft send their employees with a camera each to the library.
you joke but Google did exactly that, i worked on the program for a little while.
The library pays/paid for those books (usually at much greater cost exactly because they're meant to be accessible), most often through taxes.
Those books you read were copyrighted.
Despite the books being copyrighted that doesn't give the authors any rights over the code I have written.
It does when you produce the code verbatim, as happens frequently.
Betcha I’ve spontaneously produced code that’s been written before. Who do I owe royalties to?
You're not a computer whose sole purpose is to regurgitate code verbatim at massive scale when requested, unlike an LLM designed for exactly that purpose.
Except LLMs aren't exactly optimized for verbatim regurgitation.
under what system of law?! -- there are at least four major economies in the world, and they all have different rules about these intermingled issues.