As a side note, what does laws and fire codes say about a public building that can be locked down so that folks can not get out?
As a code official, I can answer that. It's unlawful -- mostly.
Building codes say that exits must be available and functional at all times, except in certain occupancies such as prisons and certain health care facilities, where special provisions apply. The types of locks and latches are regulated, generally prohibiting any lock or latch that requires "tight grasping, pinching, or twisting of the wrist" to operate. There are provisions for delayed action locks, under certain conditions. These locks are for places like libraries -- when you depress the pushbar, an alarm sounds but the lock doesn't release for ___ seconds. Without some research, I don't know if a convenience store would qualify to use such locks -- I doubt it.
However, in general, once the building inspector issues a certificate of occupancy there is no duty or authority to go back and reinspect unless he/she receives a specific complaint from a "credible source."
On the other hand, fire marshals typically have a duty to inspect businesses periodically. (At least, they do in my state.) When making annual (or bi-annual or tri-annual) inspections, fire marshals don't use the building code, they use the NFPA 101 Life Safety Code. NFPA 101 also requires that exits be available and operational whenever a building is occupied BUT ... there's a catch. NFPA 101 includes a provision that a building is NOT considered to be occupied if there are fewer than 10 people inside.
Bottom line: the convenience store should not have been allowed to have a lock that could remotely trap people inside, but it might be difficult to make a case against it after the fact.
As an aside, I regularly have battles with owners of small businesses who want to put double-key (key operated on the inside as well as the outside) deadbolts on their entrance doors so the staff can lock themselves in before and after hours. I can cite the code sections almost from memory, and I always get push-back. I just point out that there are locks made that accomplish what they want without violating the code. But those cost a bit more, so they don't want to use them. I have never encountered a remotely-activated deadbolt. It doesn't mean they're not out there but, if there are any in the town where I work, they were installed after the certificate of occupancy was issued.