It does. However people have a greater expectation of privacy on a device they own than on a cloud-based solution where they have voluntarily uploaded content.
Good thing the device only does this as part of voluntarily uploading the photo to a cloud based solution.
The scanning only takes place if you enable icloud libraries.
Your phone and photos app ask for this and you have to accept it before it is enabled.
Sounds voluntarily to me.