That’s not really a nuanced take on what is going on. A bunch of images of children are studied so that the AI can learn how to draw children in general. The more children in the dataset, the less any one of them influences or resembles the output.
Ironically, you might have to train an AI specifically on CSAM in order for it to identify the kinds of images it should not produce.