A thin U-shaped clip used to hold hair in place, or a sharp U-shaped turn in a road.
From 'hair' and 'pin,' describing exactly what it is: a pin for hair. The road usage comes from the sharp U-turn resembling the shape of the clip.
The 'hairpin turn' is used everywhere in racing and adventure stories because it represents maximum risk and drama—only the most skilled drivers navigate it—so the term has become metaphorical for any sharp reversal of fortune or strategy, showing how physical objects become concepts.
Complete word intelligence in one call. Free tier — 50 lookups/day.