There are real limitations of course.
I'm not sure how this works in the legal sense. A human could ostensibly study an existing project and then rewrite it from scratch. The original work's license shouldn't apply as long as code wasn't copy & pasted, right?
What happens when an automated tool does the same? It's basically just a complicated copy & paste job.
And likely there would be enough similarities that the rewrite would be considered a derived work under copyright law.
> The original work's license shouldn't apply as long as code wasn't copy & pasted, right?
You don't need to do a literal copy & paste for it to be copyright infringement.
> What happens when an automated tool does the same? It's basically just a complicated copy & paste job.
Sounds like copyright infringement to me.
If we go by the OSI's definition, a project that doesn't allow this is not "open source". So all open source projects -- not just "a lot" -- allow this.