After the civil war, there was an influx of Immigrants. Between 1870 and 1900, nearly 12 million immigrants arrived. the Majority came from Germany, Ireland even so there was a large group of Chinese immigrants.
The main reason for so many immigrants to come was for a better life and for the gold rush that was happening in United States. Many just went for the gold rush and left with whatever else they made. Soon other Chinese immigrants would open their own businesses.
With the onset of hard economic times in the 1870's, other immigrants and europeans Americans started competing for jobs traditionally reserved for the Chinese. With economic competition became dislike and even racial suspicion and hatred.
We want our jobs back! get these Chinese out of here!!
With the tension going on in the United States with Chinese and Americans fighting for jobs led to the Chinese Exclusion Act. which was passed in 1882, the act virtually ended Chinese immigration for nearly a century.
But in 1943, congress passed a measure to repeal the discriminatory exclusion laws against Chinese immigrants and to establish an immigration quota for China of around 105 Visas per year.