People were wrestling with this one long before headphones were even invented. In 1889, the comic writer Jerome K Jerome noted in Three Men In A Boat how rope can become tangled seemingly by itself.
Surprisingly, the explanation was only discovered by mathematicians in 1988. Put simply, it turns out that, unless handled carefully, the chances of the free ends of stringy objects – such as headphone wires – going through the motions needed to make a knot increase rapidly with the length of the string or wire.
Happily, that leads to a simple way to cut the risk of tangles: get rid of the troublesome free ends by clipping the earbuds and the jack together to form a loop – using, say, a plastic hairgrip.
Subscribe to BBC Science Focus Magazine for fascinating new Q&As every month and follow @sciencefocusQA on Twitter for your daily dose of fun facts.