Beat to the punch! Why?

Hi Teachers

Can you explain why “beat to the punch” means doing something before anyone does?

Thank you in advance

Mark

Etymology: from boxing, in which good fighters are quick to react by punching (hitting) the other fighter before they are hit
idioms.thefreedictionary.com/beat+to+the+punch

and the same as “beat to the draw”?
What means the draw?

thanks

Mark

I would think “the draw” here refers to drawing out a weapon from the sheath.

So beat to the draw means you hit at someone who is drawing a weapon?
and beat to the punch means you hit at someone when he starts to punch you?
I am really confused.

Mark

I am afraid not. It suggests you act faster than or a second before the person drawing a weapon.