Immigration is inherently anti worker. Nobody benefits from a larger (and cheaper) work force more than Porky does.
Why were communist(deep-socialist) countries extremely nationalistic and patriotic...
To defend from Imperialist aggression and counter-revolution. And historically speaking these measures certainly weren't unwarranted.
Some Marxists would argue that the sole purpose of the State is to articulate the dictatorship of one class over another, in a Capitalist state you have the dictatorship of the Bourgeoise, under Socialism the dictatorship of the proletariat. Under Capitalism we have a one-sided class war against the Proletariat, under Socialism one-sided class war against the Bourgeoise for the express purpose of, at one point abolishing the class relation itself. If you want to understand this concept, as well as what went wrong along the way in the USSR I'd highly recommend you read Lenin's State and the Revolution, Sheila Fitzpatrick's The Russian Revolution, and this link right here libcom.org