Bonus question: How was this related to the founding of Germany as a nation?
The rural Germans, were being squeezed by increased populations that lead to smaller field sizes. This, in the midst of vast improvements in tillage and other agricultural practices increased productivity and made it harder to eek out a living on the land that the farmers already had. A pattern that really started in England with the Enclosure movement (open grazing lands and other lands were no longer available With many farmers being pushed off their land there was a massive internal migration in Germany to as the rural Germans found new places in the cities and new industrial areas like the Ruhr.
The industrial areas provided jobs, but, as even a cursory glance of the industrial revolution will tell you, these jobs were incredibly demanding and the living conditions in the cities was often worse than that of the rural areas.
Faced with struggle no matter where they went in Germany, many (millions to be more precise) of Germans decided to brave the expenses and risks that it took to go to the U.S. The U.S, especially post civil war, was booming and had plenty of chances for employment and enterprise. The most alluring perhaps was the legally enshrined right to giveaway 160 acres of land (an amount unfathomable to most farmers back in Germany) under the homestead act. If you were an uneducated German farmer in the 1800s faced with slowly losing your land through financial pressures or backbreaking factory work, the opportunity to own 160 acres of land with little to no fees was almost a dream.
This is perhaps the biggest why, but, plenty of other educated and less impoverished Germans also made their way to the U.S to start businesses or to invest in a booming economy. Others were political refugees from the Napoleonic wars, 1848 Revolutions, and the wars that surrounded Germany's unification. Overall America provided political sanctuary and economic sanctuary when Germany was going through revolutions, wars and social upheaval, and millions of Germans took advantage of America's need to settle its interior.