There is always a combination of push and pull factors when it comes to a migrans decision to leave his or her home country. It's never just one reason that drives a person change their entire life.
In China’s case, the push factors were often poverty and fear of political persecution.
The pull factors were generally economic opportunities abroad, including for example the Gold Rush in the 1850s in California and Canada or the trans-pacific railroad of the 1860s, also on the West coast of the US.
A bit earlier, you had economic opportunity presented by Southeast Asia. European colonisers who had sugar and rubber plantations needed labor and looked to Chinese to fulfill the labor gap.
Same for the European colonisers in the Caribbean, the Dominican Republic, Suriname and Peru.
After the abolition of traditional slavery in the first half of the 19th Century, the Europeans still needed labor, but they couldn’t get slaves from West Africa anymore, so they switched focus to mainly China and India.
The 19th Century afforded many economic opportunities across the globe and as such it was a popular period for migration.