For some reason Western directors like to show bullet impacts e.g. shooting bottles, hats or just wood planks. This could be easier to do with real bullets.
It's also possible they brought in guns from an unrelated activity (e.g. cowboy action shooting) and failed to check them properly.