Also note that this legal theory only comes into play if they're compelled to do so. The police and investigators can always just kindly ask for records to be produced without a warrant and it's up to the institution to honor that request or not, much like how Google does its own review of law enforcement data requests in absence of a warrant.