Well, if I saw an instance serving child sexual-abuse material (CSAM)¹, I would report it to NCMEC and possibly also the ISP where that instance was hosted. I expect that this would lead to it being taken down by the ISP or by law enforcement.
I think a lot of other users would do the same. We might also message our home instance admins and suggest defederating from that instance; but this is secondary.
However, if I saw an instance serving (say) torrent links for pirated movies, I would not feel any need to do anything about it. The copyright industries can pay for their own enforcement.
¹ By "CSAM" I mean material involving the sexual abuse of an actual child; not fictional stories or drawings. Y'all loli/shota manga fans may be perverts but you're not molesters, and your stuff is not illegal where I live.
Nothing is preventing an instance catering to any or all of those from being created, but that instance could be defederated by other instances who don't want to support that content.
Instances can choose to defederate from other instances for any reason. Think of them like divorced parents: they refuse to talk to each other. Federation is vital to the Fediverse. If most instances end up defederating, the illegal content instance can't thrive.
Groups of defederated instances could then stay federated between each of them. Don’t you guys fear that this could cause at some point a lot of harm to Lemmy’s public image?
This has already been happening with Mastodon for years. It creates a need for instance admins to stay on top of defederating from those instances, and from instances that refuse to defederate from those instances. It doesn't particularly impact public perception of Mastodon overall.