story
It's a bit like how GPT-3, Stable Diffusion and all those generative models use extensive amounts of copyrighted material in training to get as good as they do.
In those cases however the output space is so vast that plagiarism is very unlikely.
With code, not so much.