For many decades, the military was stationed at the border with a few other countries and sent the illegals back, though some have always gotten through. Contrary to your statement, most of the illegals don't get jobs and starve, become criminals,etc.
I know that Blacks fled their homelands hoping to find work in South Africa. I vaguely remember some kind of strike in Soweto -- were the locals refusing to pay their electric bills? Despite living in a slum, they had electricity to begin with, unlike most Africans.
I seem to remember reading somewhere that businessmen hired cheap Black labor despite the fact that laws were eventually passed prohibited this. I stand corrected.