So, when a human reads public code on the Internet (no matter the licence), and gains knowledge, learns (updates the synaptic weights of the brain), and then makes (indirectly) use of that gained knowledge for further work, how is this different to this case?
It's no different, but if human reads copyrighted proprietary code and then reproduces part of it exactly he have good chance to get into huge legal trouble.
On other hand said AI have no idea of who the code belongs to and it's able to reproduce it perfectly.