Why did the U.S. government first oppose unions?
Prior to the 1930s, no electable political party represented workers' interests.
Although the Democratic party has come to represent workers and labor unions, this was not the case prior to Franklin Roosevelt. With a handful of exceptions, all American elected officials come from (or wind up in) the same social class as business owners and management, not laborers.
Historically, the major political parties split on matters kind of unrelated to organized labor concerns. The Federalists favored the North and trade with England, and the Democratic Republicans favored the South and trade with France and the Continent. 50 years later, the Democrats were the party of Southern planters and slave owners, and the Republicans were the party of Northern bankers and stock market insiders.
By the early 20th Century, both parties were vying to become the party most sensitive to the needs of the super-rich. Neither party was much interested in representing workers or the special needs of immigrants or Blacks. (The exceptions to this, the Socialist and Communist parties, were as marginal in America then as they are today, and were even more demonized.)
Labor unions were associated in the public mind with criminal activity and thuggishness (See: Haymarket Riots , Molly Maguires ). This changed with the Triangle Factory Fire, a 1911 New York City fire where sweatshop workers were locked inside a burning building. Management had blood on its hands too.
By 1930 and the start of the Great Depression, most of the nouveaux riches of the 1920s had lost their fortunes in the stock market. Suddenly, the poor- and working-man's vote was just as valuable as anybody else's.