Another major cost in retail is "loss" ... I can see this being pretty effective at loss prevention and coupon fraud (even my small town grocery store require an associate to visit the self-check kiosks if a customer has a coupon).
[1]: https://www.theverge.com/2020/2/14/21137580/apple-store-reta...
If all the store sold was usb charging cables, there wouldn't be any searches.
Unless the grocery store is selling tins of caviar, the problem is simply not at the same magnitude.
Any other concerns about cheating the system for thefts are as ludicrous as people worrying about people shooting drones out of skies with shotguns or hijacking self-driving trucks.