Because back in the late 1800's (??) when the spanish originated the instrument, a "classical" guitar as they are called now days, they used to polish the fret boards with hair from the human scrotum... Starting at the 21st(?) fret, they would slowly work the short curly's back to that thing at the end of the fretboard, the "tuerca" (a.k.a. in english as the "mechanical nut"). The name has stuck ever since...
Who cares? That's like asking "who the hell made 'bitch' a curse word?"
would a "mechanical nut" be something more like a lever as compared to the typical nut/bolt (or that of the scrotum hehe... i had a feeling that would be mentioned )