It is probably wired up to the fire alarm like many emergency exits are.
And if there's no fire alarm? Maybe an active shooter or other situation that causes a stampede of people to try to leave the store?
Seems like an unnecessary risk to public safety in the name of loss-prevention.
These gates, if they plan to use them, should only lock if a security tag has not been deactivated (triggering an alarm).
The way it seems to be designed is that everyone is guilty of theft until proven they haven't stolen anything. And it doesn't seem like scanning the receipt actually proves this.