The fed is not technically part of the federal government. There are the twelve privately chartered banks and a Board of Governors. Hope this helps!!
[0] https://www.federalreserve.gov/aboutthefed/structure-federal...
Each Federal Reserve bank, in turn, has historically had some kind of monetary policy or financial specialty: most are chartered to advance monetary policy within the district they belong to, and many have special additional responsibilities (such as the NY Fed's storage of the US Treasury's gold reserves).
The TL;DR is that they're independent banking entities within the Federal Reserve system, which was designed to provide uniform central banking to the entire United States.