The riddle
How Did the Barber Win the Race?
Two ways to cut short
A shortcut, one word, is a path between two points that is faster than the usual one. Wiktionary gives that sense first and adds a second: a method that leaves out one or more steps. Split into two words, short cut, it also describes what a barber does with hair: Wiktionary defines the barber as a person who cuts the hair and beards of usually male customers. The riddle lets the listener hear a runner's trick and a barber's trade at the same moment.
A word built on beard
Wiktionary says barber came into English from Anglo-Norman barbour and Old French barbeor, from barbe, beard, and ultimately from the Latin barba. The word is built on the Latin for beard.
Shortcuts of other kinds
Wiktionary lists more senses of shortcut than the road. In computing it is a file that points to another file and gives quick access to it, and it is also short for a keyboard shortcut. Each saves steps, like the barber's route. An anonymous 1863 book, Riddles and Jokes, also asks of the same trade, "What wig cannot a barber make?" and answers, "An earwig."
How the joke is built
Races usually reward speed, so the question invites a guess about fast legs. The answer gives the win to knowledge instead, which is the surprise.
Telling it
Say the answer with a clear gap between short and cut the first time, then run the two together the second time. Listeners hear the two meanings separate and then join. Try next: how many months have 28 days.