They still need to identify themselves as the police. What they displayed is mob behavior; armed people threatening and going through a person's possessions.
There's no need for an undercover officer to identify themselves as such. They're free to lie and manipulate (to an extent). It would kind of defeat the purpose otherwise.
There's definitely a need if they intend to wield their authority as a police officer. Random people on the street can't just come up and handcuff me and go through my stuff.