It's likely defended due to being non-commericial and for the public good, as I posted with my link to the Harvard page above. That was for literal copying and pasting so the bar for transformativeness is higher, but with generative AI where it can produce wholly new code/images, I think it will also be deemed fair use.