It happens all over the periodic table. The chemical symbol for lead is Pb. For mercury, Hg. For antimony, Sb. My chemistry teacher in high school cracked up every time she referred to the symbol for tungsten—that big, fat, unaccountable W. So what gives? How did these elements get symbols with letters that don't even appear in their names?
One answer lies in the cosmopolitan nature of the periodic table. Chemists in Europe discovered most of the elements between about 1700 and 1900, and while certain countries had the intellectual edge at various points, England, France, Germany, and Sweden all produced brilliant scientists who isolated various elements. Often, though, it wasn't clear who had discovered an element first, and the same substance might go by different names in different places for decades. The symbol for the element we call "tungsten" in English is W because the Germans call the element "wolfram." It was a compromise between different countries' claims.
In addition to discovering elements, scientists in the 18th and 19th centuries were also interested in studying their chemical properties. Like the scholars of today, they often drew on the work of other scientists, to compare notes and avoid duplicating work. The symbol for potassium, K, derives from an Arabic word (al-qili) used by Islamic chemists during medieval times. The funny abbreviations for elements like gold (Au), silver (Ag), and iron (Fe) trace back to classical texts, mostly in Greek and Latin. Early chemists had to be fluent in multiple languages and had no trouble flipping back and forth between names like "natrium" and "sodium" (symbol: Na) or "plumbum" and "lead" (symbol: Pb).
Still, that doesn't quite explain everything. Virtually no one spoke Latin as a native language after the fall of the Roman empire, and the Greeks, whatever other wonderful work they did, produced almost zero scientific knowledge after Aristotle died.
In the early days of science, before today's huge government subsidies, only the elite could afford to practice it. Few other people had the money to build laboratories; even fewer had the leisure time to sit around and wonder what some obscure minerals or gases were really made of. The ones who did were gentlemen. And one sine qua non of being a gentleman was knowing Latin and Greek. Scientific papers were published in Latin, with the occasional dash of Greek. The influence of Greek and Latin was partly practical—a common language for men of letters—and partly the social bias of scientists who used classical languages to display their erudition.
As the influence of Latin and Greek began fading strongly in the 1900s, it became less fashionable (and practical) to use those languages in science. The names of all the elements discovered in the past half-century correspond pretty closely with their symbols—especially in English, which has emerged as the lingua franca of science. Indeed, the symbols for most ultra-heavy elements—the likes of rutherfordium (Rf), dubnium (Db), hassium (Hs), meiternium (Mt), and roentgenium (Rt)—all follow the same pattern: a capitalized first letter, with the second letter drawn from the most prominent consonant sound down the line.
Still, the influence of Latin at least hasn't quite died out on the periodic table. There's a long lag today between the discovery of an element in a lab and when that element is declared official by outside chemists. And between those times, elements receive three-letter Latin abbreviations, based on their number. The letter u stands for un-, one; the letter b for bi-; t for tri-; and so on. Hence the provisional Element 113 is Uut, ununtrium, and 114 is Uuq, ununquadrium, etc. These symbols and names are about the last holdout of what was once the most dominant language in all of science.