I’ll let the Huff Post explain:
The Los Angeles County Sheriff’s Department released this surveillance footage from the Ace Smoke Shop in Altadena that shows two masked men entering the establishment with a rifle and a backpack. At first the robbers demand money from store owner Eric Knight, who starts putting cash in the backpack offscreen.
They’re interrupted by the store owner’s dog, who begins barking ferociously at the armed robbers. Flustered, the two men grab the back pack and run away, but not before pointing the rifle at both the cashier and the dog.
The store owner rescued the dog from a shelter five years ago so I guess this is the chihuahua’s way of paying him back.