They hit him because he’s behind the line. By law they can use force to compel him to move. I wish people understood the laws. If the police declare an unlawful assembly, they can use force to compel you to move.
In layman’s terms, they can hit you until you leave the area.