They see them as weak now, and therefore legitimate targets. They are incited by the Mexican government to hate US police, and they know that generally, nothing will happen to them if they perpetrate an attack. This is a signal to them that the 'other side' is willing to give up.
As an Israeli Kibbutznik said about living on the Lebanese border: "If you don't fire back, then you are weak. And in the Middle East, if you are weak, then you are dead".
Same's true on the Mexican border.
Well said.