Alarm guns like this are used by gamekeepers to prevent poaching. The gun would be staked into the ground and loaded with blank cartridges. One end of a trip wire would then be tied to the trigger mechanism, the other tied to a post or tree. The idea is poachers entering a field or woods would pull the tripwire causing the gun to fire. Because the gun would be a short distance from the poachers the sound of the gunshot would be very loud. This would make poachers think a gamekeeper is trying to shoot them causing them to run away. Even if the poachers were not scared by the gunshot, or knew it to be an alarm gun, the noise would be loud enough to scare nearby animals away, as well as alerting the gamekeepers that the poachers were there.
This gun was used in Greenham which has roe deer a game animal that were popular targets for poachers.