One of the web's first giants chose to name itself after an insult.
The insult is Jonathan Swift's. In Gulliver's Travels, published in 1726, Gulliver reaches a land ruled by the Houyhnhnms, horses endowed with reason. The Yahoos are their animals: filthy creatures that look disturbingly like people. Word Histories quotes Gulliver's verdict that he "never saw any sensitive being so detestable on all accounts."
Swift seems to have made the word up. Etymonline describes it as "a made name, prob. meant to suggest disgust." It escaped the book fast. In 1760 the Public Advertiser sneered that a man "with all his boasted Morality" was "but a better kind of Yahoo." The word settled into English meaning a boor or a lout.
Nearly 270 years later, two Stanford electrical engineering graduate students needed a name. In January 1994, Jerry Yang and David Filo had built a hand-organized list of websites called "Jerry and David's Guide to the World Wide Web." That was accurate but hard to say.
They renamed it Yahoo in the spring of 1994. According to Wikipedia's history of the company, they picked the word because they liked Swift's meaning: "rude, unsophisticated, uncouth." The self-mockery suited two students cataloging the early web by hand.
A famous acronym is often offered as the real origin: "Yet Another Hierarchical Officious Oracle." Wikipedia calls it a backronym, an expansion fitted to a name they already liked, not its source.
The exclamation mark was a legal move. "Yahoo" was already trademarked for goods including barbecue sauce, knives and canoes. Adding the punctuation gave Yang and Filo a mark they could control. The company was incorporated on March 2, 1995.