That's a power that regular criminal investigators have had for hundreds of years. It now applies to counterterrorism investigators. They have to go to a judge and get a court order to obtain the records.
There's a provision that allows counterterrorism investigations to get a court order to obtain documents from car rental places or hotels, or in theory, I suppose, libraries, although I can't figure out how libraries got mixed in this,