It doesn’t (and never did) make any sense. Why is the value of US money tied to the amount of gold you can pile up in one place? The US dollar is based on the stability and wisdom of US government monetary controls. Obviously, opinions of this basis will vary.
A rainy day? I think the primary function now is to stabilize the price of gold since the world knows the US has a big chunk of it that can be bought/sold. The references below say that there is little or no buying or selling now but the current amount (worth about $50 billion at current rates, by my calcs), is only about 25% of the peak amount (before WWII).
I might be wrong, but I beleive we went off the gold standard in the great depression to allow inflation to help stimulate the economy. I’m less sure about the gold in Fort Knox, I think it is there to act as a backer for the value of the US paper money.
Or paraphrased, the gold standard would be preferrable because the dollar is based only on the stability and wisdom of our government’s monetary controls. It’s worked pretty well recently, because we’ve had stability at the fed, but I can imagine circumstances for which the gold standard would be better.
My favorite description of the gold standard, I think from Milton Friedman, is that it’s a “barbarous relic.”
The dollar was de-linked from gold by Nixon, as daniel801 said. Why was it ever needed? To lend faith in money, of course. Go here for a sound-bite sized history of gold. Early on, the US government needed something to reassure people that the money in circulation was actually worth something. The Coinage Act of 1792 set the value of the US dollar as a mix of gold and fine silver. Up until this point individual states had been issuing currency, and their value was subject to wild fluctuation. In 1900 the US switched to a pure gold standard, and remained on it until 1973.
Although it is taken for granted now, having faith that a piece of paper will actually be worth what is printed on it is a relatively new idea historically speaking. Governments come and go, but gold has always had value. Think of the gold standard as a transition. It was a transition from the old ways (gold as the standard measure of wealth) to the new ways (a currency established by a government as the measuring stick).
Think of how long gold and silver coins were used as money - the value being in the gold or silver contained in the coin itself. It is only recently that we have moved to money that reflects value rather than having intrinsic value. This was a huge shift in thinking, and it could not happen overnight - in fact it took generations for it to fully take effect.
Going off the gold standard effectively marked the end of the transition, and affirmed the solvency and trustworthiness of the US government.
As to why the gold in Ft Knox - well, at one point every US dollar WAS redeemable for gold, so the US had a huge hoard of it. When we left the gold standard the gold itself did not become worthless; in fact after decoupling the dollar from gold the price rose from $35/oz to $120/oz. Why throw that away?