They weren't immigrants as such either. As residents in the British Empire, they had a right to settle in any other part of the Empire.
Setting aside what any exact legal definition is: These people were British before they came here, were British when here, are British even as the Home Office detains them, deports them, denies them jobs, benefits, welfare and healthcare. That's what makes it so appalling.
It is easy to see how it came about; "Illegal immigrants" are "those who shouldn't be here", which became "those without evidence of a right to be here", which meant many of the arrivals, unable to provide that evidence, were de facto "illegal immigrants".
The "hostile environment" May created turned "innocent until proven guilty" into "guilty unless proven innocent" and changed "balance of probability" to needing to provide absolute proof of innocence.
May, Rudd and the Home Office then merely concerned themselves with removing "Illegal immigrants", chased the targets they had promised, and cared little beyond that. It didn't matter who people were, only that they could be classed as "illegal immigrants". The Windrush generation without paperwork were easy targets, low-hanging fruit, "illegal immigrants" hiding in plain sight.
Every little helps. They were just numbers to callous Home Secretaries and a ruthless Home Office.