You missed a word... "to make the country as hostile to ILLEGAL immigrants"
The best way to do so is to make sure that the LEGAL ones are OK.
It is the norm for LEGAL immigrants, families with legal immigrants and their first generation progeny to be on the right side of Attila the Hun on this question. The most hostile group towards ILLEGALS is the LEGALS. The fact that half of UKIP/Vote Leave top brass had an immigrant wife and some of the poster-children of anti-immigrant movement are immigrant's descendants is not a coincidence. It comes with the territory.
However, what the government did was an explicit act to make the LEGAL immigrants ILLEGAL overnight and disguise it as a data protection obligation. That is completely different from "hostile to ILLEGAL immigrants". It did it for people from Eu too - see my other post. At more or less the same time.