Their CSAM reporting looked awful. They needed a solution. They came up with something that's definitely more elegant and more privacy-oriented than scanning all iCloud Photos.
They went for the more complicated solution, which incidentally is one that less people will properly understand (or care about), therefore limiting the size of the inevitable dent on their privacy reputation.
I think they are also preventing the consequences of some upcoming legislation in the US, UK and other parts of the world to make CSAM scanning mandatory in the Cloud, which would carry the risk of weakening Apple's privacy infrastructure even more.
So, if you're given the choice to go for a haute cuisine gourmet sandwich with a side of shit salad, and a huge shit clam chowder, what would you rather go for? In Cupertino they picked the sandwich.