Of course. But libraries have to design their policies to deal with a multitude of "hypothetical" situations.
Bull, let's not be livberal and wander away from the subject. This one was clearly a policy to discourage cooperation with the police under any circumstances because it demanded a court order.
Luckily, someone had some common sense to realize the folly of that in this case and overruled the rule.
For someone to go against written policy, they must be pretty confident that the policy was faulty, otherwise you're risking your job.