Make causing actual harm to an actual child illegal. Make profiting from it (eg selling pictures of said actual harm) illegal. Make possessing pictures not illegal, but something that will get you asked where the pictures came from.
.
But really it is about thoughtcrime. Society (or at least politicians) have decided that having certain interests/desires is wrong (or rather, that those people are creepy and dangerous and can't possibly have the self-control to not fully act on said thoughts). And so anything that may indicate someone having said thoughts is made illegal, even if it doesn't hurt anyone, and even if it indicate that they know not to act in harmful ways.