If I'm going from store-to-store around town, my understanding is that police are allowed to watch me and even go into the businesses and ask questions or pull security footage without a warrant. The information they gather is circumstantial and probably would not hold up in court, but they can use it as grounds to get a warrant.
Let's imagine a different case. Instead of police having to go in and ask nicely for customer logs and security footage, the owner happens to have meticulous notes that he keeps and sells to randos around town. Creepy... but it's largely the same data that they could have gotten by asking nicely enough anyway.
If there is no law against the proprietor bundling up his customer data and selling it, it doesn't seem like there is a strong legal case against police using it.
Obviously, this is a MUCH bigger problem on the internet than in real life - just in the huge difference in scale in the amount of data and the ability to parse it.