As I understand it, the anti-AI stance of open source software people in particular has nothing to do with AI learning from code bases, and everything to do with AI slop clogging all unrestricted community feedback channels.
I don't have problem with AI learning from FOSS code bases. I have a big problem with FOSS code bases helping to create non-FOSS code which does not return the favor. AI-washed Windows code for Wine would be fantastic.