You're posting misinformation. Tear gas is deployed when mobs surge in direct violation of orders not to, or to control violence and criminality by large crowds. Your attempt to frame it as "cops attacking peaceful onlookers" is in conflict with the evidence available.