I've seen stations like this, that are basically built like a cage. Bulletproof window plates around the clerk, bars on windows, and lockable reinforced door. The lockable door is to prevent robbers from leaving until the police arrive.
It isn't to keep somebody inside for $4 of goods. Report it and be done with it. The clerk got people killed with their overreaction to the situation.
I can't help but think that he didn't know the guy was armed, and locked the door thinking that the guy would cough up the $4 if he couldn't leave.
The clerk didn't do the shooting, but that was obviously the last straw for the idiot who did. It might have been prevented, but that shooter is a loose cannon so he might've killed people elsewhere if not here.