It’s staged.
Looks like it was. However, I'm not sure they expected the monkey to actually fire the weapon.
Monkey see monkey do. If you hand a AK-47 or Uzi loaded with real (not blank) bullets in the cartridge and showing the ape how to shoot of course you'd run like those soldiers, make no mistake...