Any actor, musician or performer is used to hearing or saying “break a leg” right before a big performance.
It may seem barbaric to anyone unfamiliar with the term, but it’s only a way of saying “good luck,” albeit with a rather violent implication.
So how on Earth did the saying start?
Actors are incredibly superstitious people. An article called “A Defence of Superstition” claimed that in horse-racing, also a superstitious institution, wishing “good luck” is considered unlucky. It claims, “You should say something insulting such as ‘May you break your leg!’”
Consider another meaning behind “break a leg” – it also means to make a great effort. This meaning came before its use in the theater; this source quotes The Hammond Times from 1942: “Whatever the army or navy want, the Continental Roll [and Steel Foundry] will turn out … Or break a leg trying.”
With this earlier meaning, “break a leg” might simply tell actors to put in their best effort.
The meaning could also be as simple as having your “big break” in a play.
Just like many other popular idioms, “break a leg” doesn’t have a clear origin. But it’s so popular that the ‘why’ of it all doesn’t matter so much as the meaning behind it.