The government typically collects funds through loans against foreign governments, state & local governments, as well as taxes. They also can "loan" money from the public and businesses with bonds. This is typically where they get most of their budget.
A deficit occurs when the spending (either in military, infrastructure, loaning to foreign interests through aid, or simply for running government programs) is over the amount of the amount collected. This creates what we know as the US national debt.
It was due to the Sherman Anti-trust Bill. Under this bill, joining unions was illegal. Strangely this bill was created to prevent
the abuse of big business but it managed to prevent workers from creating or
joining unions at the time.