It was to egg on the violence that could be blamed on Trump.
Some actual patriots were videoed that day calling for peace and to obey the police. The MAGA-identified undercover agents rightly suspected they might not have been able to provoke Pelosi's desired level of violence if they looked like Trump supporters. That's why some had to be leftist agitators.
The best that can be said is that they were trying to entrap actual leftist agitators; but the truth will never be known as long as the FIB keeps hiding these witnesses and suppressing their testimony.