The problem is, if you confront someone who's being aggressive - chances are they're looking for a scrap, by confronting them (presumably by squaring up, willing them on) you're essentially inflaming the situation, rather than deescalating, this will catch up with you in the interview room at the police station, especially if you had the option to walk away, but chose not too.
By walking away, you're doing everything you can to avoid a physical altercation, the best thing to do is just call the cops, keep a good distance and record whats going on for them, that way you're safeguarding yourself from being dragged into an absolute nightmare.