It's called reducing the chances of any shooters even trying such a stunt.
If they know a teacher is trained to use a gun and has one on hand.
Then the bad guy simply shoots the teacher first.
But if ALL law-abiding adults were allowed to carry concealed.... most of them still wouldn't bother. But a few would. And the murderer wouldn't know which ones they were.
But he would know there's likely a few armed people in the crowd where he's contemplating doing his thing. Which means he probably won't be able to rack up a huge body count before somebody stops him. Which means, he won't get what he wants out of his attempted murders - lurid headlines for weeks after he's dead.
Which in many cases, will make him decide to not even try it.
And maybe that gives you 30 or 40 lives saved. Without a shot being fired.
Shooting the bad guy isn't the most important reason for law-abiding people to be allowed to carry (though it's a good start).
The most important reason, is that it will often
deter him from ever doing his murders in the first place. Sure, a few of the REALLY crazy ones will try it anyway. But a number of them won't.... and many innocent lives will be saved.
It's far more important to allow ALL law-abiding adults to carry concealed, than to just restrict it to teachers or staff. Then the bad guy will have no idea where the bullet(s) might come from. It's enough to make him find a different line of work.