Long guns can be set down, especially when gutting and skinning the animal. Likely they couldn’t get to and aim a long gun in time. Also a long gun could be a 22 or a shotgun with birdshot. A pistol is probably going to be a large caliber bullet.
The few times I’ve camped in an area where bears were a real possibility I took the largest handgun I have. A full size 1911 in 45 cal. I put FMJ in it and loaded every mag I have.