This is probably done to compete with Google Photos which has a great photo search by word feature.
With that said, Apple can use whatever privacy measures to protect user data. But at the end of the day, a subpoena can easily force them to hand over data.
The best privacy measure is to just not have the data. I guess indexing photos offline in phone is not very feasible yet.