What's the issue?
Been to loads of supermarkets abroad and this is standard practice, Not complicated.
I guess it's to stop theft. i presume you can exit elsewhere if you haven't actually brought anything but it is just a way of ensuring people don't try and sneak through without paying for stuff.