Those question was part of the original discussions that the pirate movement made around 2005. Copyright was viewed as being about a single person copying a work. The person who uploaded shouldn't be allowed to be charged with the same crime, and the site that connected the uploaded and downloaded was just a meeting place.
Lobby organizations for rights owners presented their own theories, one was that concept of "making available" a copyrighted work. They argued that the upload was equally if not more guilty of infringement than the downloaded. They also accused the website owners for facilitating and enabling.
Then came the pirate bay case and a glaring issue struck the pirate movement. If technology can make creative solutions using code to bypass copyright, courts can in turn make creative solutions around law. The law that was used to charge the founders of the pirate bay was originally intended to combat bike bars when those places was used as headquarters for illegal gangs, a far step away from a website hosting files which enable two people on the internet to transfer files.
So we can go around and blame the AI for doing the infringement, or even the researcher who invented the math that created AI, but as with any creative technical solution around copyright we have to ask what creative solutions the lawyers and judges will make.