Police officers are law enforcement and enforced the law that states inside the Capitol grounds no demonstrations of any kind are allowed.
What is your opinion about Jan 6, 2021 “peaceful demonstrations”?
January 6 United States Capitol attack
(January 6 United States Capitol attack - Wikipedia)
Resulted in
Delay of counting electoral votes by several hours[15]
Extensive physical damage;[6][16][17] offices and chambers vandalized and ransacked; property stolen;[18] more than $30 million for repairs and security measures[19]
On January 6, 2021, following the defeat of U.S. president Donald Trump in the 2020 presidential election, a crowd of his supporters attacked the United States Capitol Building in Washington, D.C. The crowd sought to keep Trump in power by preventing a joint session of Congress from counting the Electoral College votes to formalize the victory of President-elect Joe Biden. According to the House select committee that investigated the incident, the attack was the culmination of a seven-part plan by Trump to overturn the election.[31][32]
And does that explain why there are laws against any demonstration on Capitol grounds or in the Capitol building itself?
Here is an example of your position"
Representative Marjorie Taylor Greene, who has long downplayed the January 6 riot that claimed five lives, has denounced a peaceful protest on Capitol Hill as an “insurrection” and demanded that the police preserve surveillance footage of the protesters.
Hundreds of Jewish American activists—many of them members of Jewish Voice for Peace, an anti-Zionist group—held a sit-in at a House of Representatives building on Wednesday to demand a cease-fire in Gaza. It was too much for Greene’s delicate sensibilities, apparently.