The Smithsonian Institution owes its existence to James Smithson, a British scientist who lived from 1765 to 1829. Not a whole lot is known about the man, least of all why he chose to make his generous gift to a country he had no strong identifiable connection to, but there are some facts we do know. He was an illegitimate child, who, along with his half brother, inherited a substantial estate. Smithson was a noted chemist, mineralogist and geologist who published more than two dozen papers in those fields. He was also a fellow of the Royal Society of London and a charter member of the Royal Institution of Great Britain.
In Smithson's last will and testament, which he drew up in 1826, he named his nephew as his major beneficiary. Had that nephew fathered a child, legitimate or otherwise, the fortune would have passed to him or her upon the nephew's death. But since he died without heirs in 1835, the lucky recipient turned out to be the United States of America. The fortune involved, which at the time was valued at $508,318.46, would be worth around $9 million in today's dollars [sources: The Smithsonian Institution, MeasuringWorth].
Along with his extremely generous and curious bequest, Smithson also penned what is still considered the Smithsonian's mission statement: "I then bequeath the whole of my property [...] to the United States of America, to found at Washington, under the name of the Smithsonian Institution, an Establishment for the increase & diffusion of knowledge [...]"
The exact motive Smithson had for leaving behind such a legacy has never been discerned, although various theories have been proposed. Perhaps it was bitterness over his illegitimate status in society, or irritation with the actions of his scientific peers. Perhaps he wished to help promote the ideals of the Enlightenment in a flourishing young country, or simply ensure he was remembered long after his passing.
A fire ravaged the original Smithsonian building in 1865 and the majority of Smithson's personal papers and other possessions were lost in the blaze. Many people have since tried to lift the veil on Smithson's life through other sources, such as his collection of books, scant surviving writings, bank records, and others' diaries and correspondences, but the reason for his gift remains enigmatic.
As you may well imagine, Smithson's vaguely worded bequest could have been interpreted any number of ways, and the vast sum of money involved was a tempting carrot when dangled in front of squabbling U.S. statesmen during a national depression.