Let me clarify - I fully recognize the issue at hand at not just a crazy person. But this guy is letting the security guard control the dynamic, when he doesn't have to. I'm not suggesting this is the same as the random homeless dude yelling at me that he wanted to poison all the hot dogs in the city. But I am suggesting that your reaction doesn't really need to differ.
I've lived in NYC all my life. I've never been yelled at by a homeless person. It could happen to me today, who knows, but I'm not sure I would let that define my understanding of NYC. New York is not what is shown in the movies or TV shows. It's not a sequence of crazy experiences waiting to happen. It's a city where people live and work. The guy was simply doing what he perceived was his responsibility. Whether he was right or wrong is open to discussion, but he was not a homeless guy yelling about hot dogs.
No, quite the opposite. I grew up in the Bronx in the 80's and 90's and went to school and worked in Manhattan and Brooklyn. I've seen some stuff, but never been personally yelled at by a homeless person. It probably will happen to me at some point, but I won't use it to frame future interactions other New Yorkers.
I'm not saying that it would be better to submit to the security guard but a random crazy person has less potential impact on my life than a random power tripping security guard. Security guard could arguably call the cops on me and make something up.