Historically, there were waves of emigrants from Southern China to Southeast Asia since 明 dynasty (1368-1644). So, their descendants shared the same Cantonese, Hokkien surnames with people in Southern China.
Then, the British empire acquired Hong Kong & Malaysia in the 18th century. Both governments used the same / similar romanisation scheme to register people's names in English. That's why Malaysians with Chinese origin would have a Cantonese / hokkien surname, as those in Hong Kong.
As far as I know, there are subtle differences:
陳 - Chan (hk), Tan (my)
黃 - Wong (hk), Ong (my)
Edited, adding info:
Several books, in literary Chinese, had info about Southeast Asia & China:
Read between the lines, you'll grasp the ideas :)