Why do they even have a real weapon on the movie set?
I’ve seen replicas that look pretty close and cannot fire a round
Typically I believe that movie and TV sets have non-functional low detail prop weapons for extras and characters that won't be seen up close, and they have very realistic ones for the close up characters. In SciFi stuff the so-called Hero props are the ones that are good looking, shown in close ups, and have the electronics that let them light up and stuff. I think it's similar for westerns except at least some of the guns need to be able to fire blanks so the firing mechanism is still there.
I suppose it's possible they need to fire real rounds sometimes. For example In "Unforgiven" Clint Eastwoods character of the reformed no-good-low-down-killer needs to go out after a lucrative bounty so he takes his gun out for the first time in years and tries to shoot some targets. The shots are taken from wide frame and as he shoots the bullets at the same time in the same camera shot you see him miss all the targets. Now maybe he shot real bullets, maybe he shot blanks and a sharpshooter shot real bullets, maybe there were small charges that went off as he shot blanks, I don't know. But it's possible that live ammo was used to make it realistic (keep it all in sync). But once that shot was over, if they did use live ammo and I were the safety guy I'd lock the stuff up and nobody uses it without going through me.