Yeah, it's a pain-in-the-ass to always have to enter a code to open your phone, but I'd rather suffer that than have the cops hold my face in front of the phone to open it up.
The police most often use this kind of power in DUI cases where they extract your blood forceably. In the terms and conditions of your driver's licences in the USA most of them say that you agree to allow the police to do this.