There’s a back story to that scene.
The writers had concocted a great fight scene all about the scrappy smaller guy defeating the much bigger goon.
Then reality stepped in.
On the day of the shoot Harrison Ford was sick with the flu and running a temp of about 101 degrees.
Instead of rescheduling the scene the director asked Harrison what he could do.
Ford replied that “If it was me I would just shoot the SOB.”
Director said great, let’s shoot him.
Ended up being a great scene.
I had heard that the final take was somewhere in the teens - and that Ford had failed to get the guy’s sword with the whip in every prior take. In exasperation, Frod draws and shoots, and both the attacker and crowd played along.
Either way, it did lead to at least one empty holster gag in each subsequent movie.