They came for the same reasons: poverty, physical threat. It wasn't any easier for immigrants then. Here's one story from a 13 y.o. girl in the 1900's.
Leading into the 1900's, we already had extreme poverty among immigrants, especially adults who had more trouble learning English and would be forced to work only in communities that reflected the culture they'd left. Surprisingly, teens and children often did better without a parent - because they could assimilate the new culture.
Finally, here's an article about the ways specific cultures were discriminated against - and why. You could speak the same language, but don't dare have the wrong accent or religion! We've tried to move past this, and the fact that we're swinging so far back the other direction is truly discouraging. America was supposed to built as a place of acceptance, and unless you are a tribal American, you can't claim "native" over anyone - just longer residency.
@lloydcogliandro - At Ellis Island, your processing was based on your level of transport ticket. If you came across in a cabin, you came across legally. If you came across in a ship's hold, it was illegal. Processing at Ellis Island for those crossers was then based on things like both race and religion. (Let's not forget that one.)