I got into a heated discussion with the unfortunate minimum wage worker at the till. They said shit like "legal requirements" "regulations". I was like which ones? I was being a real ass.
In the end the worker didn't know and the reasons were probably because they made a corporate deal with law enforcement to collect that data and sell it to them.
So many corporations make money selling such data to law enforcement, so that they can get around the requirements to have a warrant to obtain what should otherwise be private information.