Eh, maybe, but maybe not.
You could ask the AI for "a unicorn on a unicycle" and it doesn't need to have been trained on images of unicorns on unicycles in order to produce that. As long as it knows what a unicorn looks like and what a unicycle looks like, it can combine the two.
Likewise, it's possible that it may be able to generate AI child porn without any actual child porn in its training dataset, but if it knows what children look like and what nudity looks like, then it could figure out what nude children look like.
Now, none of this is to defend these AI companies. Fuck them for a thousand different reasons -- generating child porn images is just one of many reasons they're terrible. They should (at least) put better guardrails in place to prevent their AI bots from generating child porn images.
But I do think it's important to be accurate and not go into it with misconceptions. And just because an image generator is capable of generating something doesn't mean it was trained on that thing.