Why the hook-and-loop fastener began with a burr
A burr gets caught on your sleeve. The same tiny catch is why a hook-and-loop strap can grip hard and still peel open from one corner.
Mark the socket and flip the switch. The same handle swing goes from driving the fastener to resetting for another stroke.

This wrench swings both ways, but the nut turns on one stroke. Why? Watch the white mark on the socket. It turns with the nut and shows when the wrench drives. On the push, the mark follows the handle. On the way back, the handle moves while the mark stays put.
Now flip the lever. The swing that just clicked past the teeth moves the mark the other way. In this cutaway, a small rocking catch called a pawl sits against a ring of steel teeth. On the drive stroke, one end of the pawl locks against a tooth. That couples the handle to the socket. On the reset, the pawl rides across the teeth, one click at a time.
The socket stays put. The selector biases the other end of the pawl. Now that end grips on the stroke that used to click. In tight spaces, this lets you turn a fastener with short swings while keeping the socket seated. Before, that swing slides past the teeth. After, the same swing turns the nut.