I’m with Tom on this, but I wonder why a real gun was on the set?
I would imagine for the real weight and heft that promotes realism. Yes, you can get a prop gun that has the proper attributes but (maybe) it is his own weapon? If so, it works as a professional tool (tax deductible) AND for self-defense while in transit. I can think of other reasons, but for me that is sufficient - I will bet that it won't be "laying around" in the future though!