They were not uploading files. They were crawling the site with URLs that in turn made the search engine retrieve the CSAM and display it.
Still shitty, but more obviously a technical mistake than a deliberate ploy.