Police have a wide range of latitude to determine that a situation is an emergency and can do a number of things to prevent the emergency from getting worse. Things have changed significantly now that many police are required to wear recording devices- it's now clear that some police abuse their authority.
And there's no "right" way to act in those situations. Charles Kinsey got shot, lying on the ground with his empty hands on the air, because the police were afraid when they responded to a complaint. The shooter kept his job, retired, and got 100 hours of community service and had to write a letter of apology.
That being said, there are lots of crimes which could start with loitering outside a school, even if the locality doesn't have a law specifically against loitering in front of schools (which many do), loitering with intent to commit a crime is against the law, and the police only need "probable cause" to arrest you. "Looked suspicious and refused to move on when asked" could very well be enough to establish probable cause.
They also shan't use the word "shan't".
The last time I heard "shan't" spoken was by a leprechaun some twenty-odd St. Patrick's Days ago.