From the Middle English quirk, meaning a sudden twist or turn — a channel cut in stone to drain water from a molding. Before it meant eccentricity, it meant architecture. Before it meant personality, it meant the deliberate groove carved into marble to guide the flow of something essential.
"A quirk is not a flaw. It is the signature left by intention meeting material resistance."
The word arrived in English around 1540, first as a building term, then as a rhetorical one — a verbal trick, a quibble, an unexpected flourish in argument. By the 18th century it had settled into its modern sense: the peculiarity that distinguishes. The irreducible remainder after you subtract everything ordinary.