Why was the Federal Reserve set up as a private corporation instead of a government agency?

The Federal Reserve is not a true "private corporation" but a central bank chartered by the Federal Government whose Board of Governors is selected by the President and confirmed by Congress. These Board of Governors work with the 12 presidents of the privately operated regional banks to dictate monetary policy, especially through the Open Market Committee, which buys and sells Treasury Bills (the primary mechanism of the Fed's monetary policy). Though all 12 presidents are members of the OMC, only 5 can vote at a time, giving the 7 government-appointed Board of Governors significant power over the Fed's monetary policy.

Though the members of the Board of Governors are selected by the federal government, they act independently of federal policy. They are independent once selected, and, importantly, they do not receive their pay from the federal government but through the Federal Reserve System itself. Thus the whole system creates an independent central bank with a strong degree of government oversight, although, in theory, the Board of Governors should strive to realize the Federal Reserve's "dual mandate" found in its Congressional charter to promote both low unemployment and moderate inflation.

The Federal Reserve is not an anomaly in its level of independence. Indeed, it is not even the most independent central bank. The German Deutsche Bundesbank, established in 1957, was even more independent than the Fed, and it had no mandate from the national government as does the Fed in the United States (the Deutsche Bundesbank is now one of several investors in the ECB, and has thus lost its power to enact monetary policy independently).

The reasoning behind giving a central bank independence is very straightforward, all conspiracy theories aside (if you want to believe that the central banks are all controlled by some secret cabal of international bankers, there is nothing anyone can say to change your mind anyway). If monetary policy were controlled directly by a national government, then monetary policy would reflect short-term political needs rather than the long-term economic outlook. If politicians controlled the central bank, then you could expect to see a surge in the monetary base whenever an important election approached (to give the economy a jump-start, which it might not even need and which could lead to rapid inflation, high interest rates, and an economic downturn in the long-term), for example. Moreover, monetary policy should be controlled by experts in the field, or so the theory goes. Politicians have neither the schooling, the experience, (generally speaking, of course) to understand the role of the monetary base and interest rates, nor do they have the time to dedicate to researching current trends. Politicians already control the fiscal policy of a nation (i.e., how the nation spends its money collected through taxes and bonds), so this most certainly does not mean economic power is handed over to the central bank. Rather, monetary policy (i.e., how much money is in circulation at a given time) is handed over to experts selected by the federal government who can act independently of the central government, which would be far more likely to abuse monetary policy for short-term gains, in part because members of Congress are practically always campaigning for the next election.

/r/AskHistorians Thread