The received wisdom on immigration goes as follows. Growing public concern about increased immigration to the UK led the Coalition government to put in place a target for net migration, and then enact measures to achieve that target. Creating a ‘hostile environment’ to discourage immigration was part of that effort. The Windrush generation and descendants are unfortunate victims of overzealous or box ticking officials.
Almost everything in this received wisdom is wrong. Although immigration has never been popular, active concern as reflected in opinion polls increased followed the Conservative party highlighting the issue as a way to attack the then Labour government (Hague: foreign land, Howard: are you thinking what we are thinking), and more importantly an increasing number of articles in the right wing press portraying immigrants or asylum seekers in a negative light. Most people didn't think immigration was a problem locally, but they perceived it was a problem for the country as a whole. The best predictors of immigration concern was readership of the Mail, Express and Sun.
In my post about neoliberal overreach, I listed austerity and immigration as the two ways in which the 2010 Coalition government went too far in an effort to achieve neoliberal goals. Austerity was what I call deficit deceit: using scare stories about the deficit to shrink the state. The focus on immigration with the tens of thousands target was also deceit because most of the government had no intention of achieving that target. The hostile environment policy was there for show, as part of the deceit. The 'go home' vans were meant to be seen by the public, not illegal immigrants. Most of the government knew that seriously trying to achieve their immigration target would damage the economy, but rather than tell the public this they continued the facade to take votes off Labour and UKIP.
The facade came back to bite the Conservative government during the Brexit referendum. Cameron could not credibly start talking up the benefits of EU freedom of movement while at the same time putting policies in place that made it appear as if he was trying to hit his own immigration target, and then failing to do so. In that sense the Conservative's immigration policy created the Brexit disaster.
Part of the facade of trying to hit that target was the hostile environment policy. Some ministers were right to suggest that the policy was “almost reminiscent of Nazi Germany”. To say that the policy only applied to illegal immigrants misses the key point: people were assumed guilty of being illegal until they could prove, and pay to prove, that they had a legitimate right to be here. Being assumed guilty could mean losing your job or your home. If the Home Office made a mistake, the applicant had to pay to try to put it right. If the mistake was large enough, they could be detained without trial.
What is worse, the policy entrapped landlords, employers and nurses into acting as extensions of this Home Office regime. Some, fearing the consequences of getting things wrong, were bound to be tempted to discriminate against anyone who was not white and did not have a British accent. In that sense the policy actively encouraged discrimination. But the Conservative party didn't mind, just as it didn't see any problem in conducting an Islamophobic campaign against Sadiq Kahn
The hostile environment policy, like austerity, has ruined people’s lives. Some are Windrush, some are not. The Home Office were warned about how the policy was entrapping innocent people in 2014, but did nothing. Rudd and May could see what the policy was doing to innocent people caught in their net, and they made no attempt to change anything. They only acknowledged problems when they were forced to by public opinion. 
Like austerity, the Conservative party’s focus on immigration seemed like a useful political tactic at the time, as well as playing to the xenophobic elements in the party’s base. Like austerity, the policy started to do real harm to innocent people, yet the leadership showed no inclination to dilute or abandon their policy. While Cameron and Osborne could see that the immigration target was only there for show, they had given the responsibility of achieving it to someone who didn’t get the deceit. Worse still, Theresa May seemed quite happy with any collateral damage as she stubbornly pursued the impossible.
So austerity and the hostile environment continue, because the Chancellor and Prime Minister respectively are committed to these policies, and seem indifferent to the consequences until forced to undertake partial palliatives. This is why I called both policies neoliberal overreach. Past Labour leaderships have unfortunately felt they had to tag along with both or suffer electoral costs. Liberal Democrats were part of the government that enacted both. The media helped construct or went along with narratives that made both policies seem essential. But there was a small group of Labour MPs who opposed both policies on principle, and continue to do so. Is it any wonder that it is they who now lead the opposition party? Is it any wonder that the political and media consensus that enacted neoliberal overreach will do anything they can to prevent that group gaining power?
 The same public opinion that supposedly was clamouring for policies to control immigration. It is sometimes said that most people dislike immigration not immigrants. When confronted (thanks to persistent strong journalism) with the human consequences of anti-immigration policy on actual immigrants, the public pull back. Most of the public lack the ideological zeal and indifference to its human consequences of many of their political leaders.