What law prompted this new feature we are discussing here?
There is a federal law requiring electronic service providers to notify if they spot such material. Apple may be subject to that. See the “Federal CSAM Law” section here:
https://cyberlaw.stanford.edu/blog/2020/01/earn-it-act-how-b...
Presumably, they are doing this voluntarily now to stave off future legislation around this that might require more invasive scanning.
1. 18 USC 2258C(c)