Jack is the diminutive or short form of the common name John, although it is also often used as a proper name.
The name Jack was so common at one point that it was used for addressing any male.
It was eventually used to designate any male person, male animals, and even a variety of inanimate objects, such as a jack for lifting heavy loads.
Hence the names lumberjack, jackass, jackrabbit, bootjack, jack-of-all-trades, and even Jack the Ripper.
A little more confusing is how the female donkey became known as the jenny ass.
Nowadays Jenny is short for Jennifer, but there were few Jennifers hundreds of years ago when “Jenny ass” became Jack’s counterpart.
It turns out that, back then, the name Jenny was also short for Guinevere, an extremely common English name for girls hundreds of years ago.