It's there so on average, most people will agree that the police did the right thing.
If most people have no knowledge of the implementation details of technology, they'll happily allow said searches to continue.
On the whole, many laws are like this. They are made so we can all live together and nothing more.