The short answer is colonialism.
If you look at the areas with an Indian diaspora, you will notice an interesting thing, nearly all areas were formally part of the British Empire. This is no coincidence as the British were largely responsible for large scale population movements across their empire. Importing laborers from India was a British peculiarity and led to sizable populations of Indian groups outside of their homelands. Some other significant diasporas are the Upland Tamils of Sri Lanka, the Malaysian Tamils, the Indo-Guyanese, and, yes, the South African Indians.
The British utilized indentured and bonded laborers heavily in their projects, drawing especially from South India and Hong Kong. These bonded laborers were essentially slaves, although their treatment was far better than chattel slaves at the time and they, at least theoretically, could buy their freedom eventually. Especially after slavery came to an end across the British Empire, bonded workers were increasingly used as Britain consolidated its hold over their colonies and undertook large-scale construction processes.
Importing workers had two major benefits. One is that in unfamiliar territory, they could not flee or rebel effectively and were thus both pacified and reliant on the British. The other was that the British created a sense of division between groups. Rarely would a foreign worker gain any real power in the British system, but over time, the British began to rely more heavily on administrators, especially Indian, from their colonial holdings.
In any case, these foreign workers largely stayed put after being moved, mostly for economic reasons than any sense of belonging or homeland, and developed distinct communities. Most retain a strong sense of "Indianess" however in since the end of the colonial era, these diaspora groups have often strongly identified with their home country above India, especially as they mix with other groups.