I'm not asking about why groups immigrated to America in this time period, but rather how it happened.
America was, to my knowledge, very anti-immigrant, so how did these immigration waves keep happening?
While American sentiment might have been anti-immigrant, there weren't a whole lot of laws keeping immigrants out (at first). For a while, it was really easy for Western European immigrants to come to America (ie - British, German, etc.) because there wasn't much economic competition yet. As more groups began to flood in (like the Irish and some of the Eastern European groups), then American sentiment really began to change. The Chinese and Japanese (and to a lesser extent, other Asian ethnicities) experienced actual legislation prohibiting their migration to America, but for a while, people kept coming to America simply because there wasn't anything stopping them.