Both of the things you describe are corporate policies. They have nothing to do with state law anywhere, and they are there because of liability. Safeway doesn't want to get sued for 1) if an employee is an idiot/racist and misidentifies someone and harms them 2) employees get harmed substantially trying to stop a shoplifter. In these cases you have rare and small losses that are miniscule compared to bad financial outcomes of intervention.
It would be easy to stop, but that costs money. It's a very simple business decision for retailers: is the cost of loss prevention higher than the loss.
The fact that this surprises you is surprising to me, this problem is many decades old in retail.
Car burglaries are a much different dynamic, and another poster mentions that it's a felony that was reclassified to a misdemeanor, and that law probably does need to be changed and is a problem for lawmakers.
edit: and can we raise the elephant in the room, which is that this is fairly solvable with a national facial recognition database and fairly low end iptv/image capture tech?