I'm telling you the old way was for security.
The shopping-in-captivity experience is not shared by any other business-- not your bank, not your pharmacy, not your doctor. It's inefficient as hell, yes, because if you picked out $5000 worth of product and tried to snatch it and run, you wouldn't make it through that door-- they have to buzz you out. Mental hospitals and prisons work like this, being high-security facilities.
There's nothing in the room at my local dispensary that you could throw through that glass, assuming it's even glass at all.
For a while, they couldn't even get payment processors to take cards for them, so they'd be sitting on mountains of cash. They couldn't get insurers to cover cash losses from robberies.
My dispensary's guards used to be armed. They no longer are. They stopped carrying around the time the place started taking debit card payments. Liability for guards shooting civilians over property crime is not a risk anyone accepts willingly. (I don't even think my bank's guard carries a sidearm. Retailers are told by insurers to give robbers whatever they want to make them go away without further incident.)