Above you quoted yourself as writing that the law promotes shoplifting - whatever that means - and also linked to an opinion piece that asserted that shoplifting in San Francisco is de facto legal because there has been no effective enforcement of the law. You adopted this position when you used it to rebut another argument without clearly qualifying that you still believed shoplifting is illegal.
Locking up merchandise may be the only tool left in a retailer's toolset to encourage thieves to move on to easier targets, including customers leaving the store with merchandise in hand (recently, this happened at Fashion Island in Newport Beach, Calif., where a tourist was murdered in a botched robbery outside the store).
What CVS is trying seems innovative, if imperfect. But the hard truth is that all retailers are attempting to reduce labor costs (use self-checkouts please), so the stores are scarce of employees, leaving customers and thieves to their own devices.
Addressing retail theft is going to require a multifaceted approach including securing merchandise, prosecuting thieves, cracking down on resales of stolen merchandise, and other broader efforts to reduce crime, which will involve a collaboration between government and industry because neither one can do this all alone.