For content that is pirated Apple would receive a slap on the wrist, but for content that shows the exploitation of children? And that Apple is hosting on their owned servers? There is no doubt every government will throw their full legal weight behind that case.
Now they are stuck between a rock and a hard place. Do they or do they not look at iCloud Photos? Well, not in the cloud i guess, but right before you upload them. Is that any better? I don't know? Probably not. They really have no choice though. They either scan in the cloud of scan on the device. Scanning in the cloud would at least let people know where their content truly stands, but then they can't advertise end-to-end encryption and on paper it may have felt like a bigger reversal.
I think the long and short answer is. Apple cannot really legally protect your privacy when it comes to data stored on their servers. The end.