The SRO had already spoken to Cruz and had investigated something about his home life. So they KNEW each other on sight.
https://twitter.com/scottbix/status/966832499568586752
Apparently an unarmed 15 y.o. was willing to do what an armed pro law enforcement officer was not:
What might have the JROTC have done had HE, instead, been armed..?