According to everywhere I've looked, Singapore is largely Chinese, with such a disproportionate amount of Malay and Indians that you wouldn't expect from a South Asian nation.
If Singapore was like Hong Kong for the South Asian states, then why didn't Malay peoples migrate to that city? Why Chinese?
Singapore does still have a fair number of Malays (around 15% today), and of course in the not-too-distant-past it was primarily inhabited by Malays, but the significant factor here is that in the early days of Modern Singapore, trade opportunities suddenly arose, attracting a large number of merchants.
In the early 19th century, Singapore came to be controlled by the British. This happened in part in 1819, but more completely in 1826. Two years later, it was incorporated into the Straits Settlements, a group of unconnected settlements on the Malay Peninsula.
Before all this, and actually in 1819, Malays were the majority. There were some Chinese, but there have long been Chinese on the peninsula.
In the case of Singapore, it was not first as labourers that ethnic Chinese first started arriving in large numbers. This is a bit different from what happened with the nearby Christmas Islands which I wrote about a few weeks back. With Christmas Island, it was phosphate mining that helped the British pay the bills. In Singapore, it was primarily the favourable conditions for trade mentioned above.
This was thanks in large part to the lack of tariffs and restrictions on trade in the new port. For many of the nearby Chinese, this offered better economic opportunities than they were otherwise likely to find in their previous (Southeast Asian) locations. Early management by William Farquhar and Stamford Raffles allowed many merchants to be very profitable, which then attracted more immigration.
In 1818 there were only about 1,000 people living there. Six years later that number was up to 10,000. Six years after that it was around 17,000. Now or course (well, in 1999) it's at around 5.5 million.
At this point it was primarily items like porcelain, tea and finished cloth which was passing through the merchants hands. A few decades later, this shifted to things like unprocessed tin and unprocessed rubber. By the 1920s, these two commodities amounted to almost 70% of exports throughout the peninsula, and much of the Malaysian rubber and tin left primarily through Singapore.
There were actually steps taken around this time to limit Chinese immigration, but unlike the efforts to limit or block Chinese immigration in places like the US, in Singapore it was brief, due to a specific economic issue (the Great Depression), and not a result of anti-Chinese sentiment more broadly. There was the additional factor of widespread loyalty to and identification with China among ethnic-Chinese, in part by the post-May-Fourth arrival of journalists and intellectuals from Mainland China who contributed to this China focus among the local population. Still, the primary reason was to help alleviate some of the pressures brought on by the Great Depression on local merchants. (see e.g. Yow, Cheun Hoe (2005) Weakening Ties with the Ancestral Homeland in China: The Case Studies of Contemporary Singapore and Malaysian Chinese, which discusses this within the 20th century)
tl;dr: The creation of a British settlement with lax regulations on trade, in a place where a Chinese merchants were already nearby
Further Reading:
Abshire, Jean (2011) The History of Singapore
Liu, Gretchen (1999) Singapore: A Pictorial History, 1819-2000