In the theater it is bad luck to say "Good luck". So you just tell someone to "break a leg." It's a way of saying good luck without saying good luck. It is also bad luck in the theater to mention the play Macbeth. Instead they say "the Scottish play."