The stairwells and corridors were not "stuffed full of people". What gives you that idea? Nothing in the many reports suggests this. Most of the people who died did so because the initial advice to was to 'stay put' (correct advice usually, the cladding compromised this). So there wasn't a crush to get out, tragically rather the opposite.
There's bound to have been illegal sub letting in the block, that's going on in all sorts of places because of the housing crisis. Possibly some illegal immigrants too. However, there's an important distinction between illegal subletting and illegal immigration. There's plenty of people in sub let tenancies, some knowingly, some perhaps unknowingly, who are legally allowed to live in the UK. LOTS. The housing situation is so desperate in London that people are being forced into all kinds of substandard arrangements - sub-lets, whole families crammed into bedsits, beds in sheds etc. We are not talking about illegal immigrants (although of course there are some), but ordinary, hard working, legal citizens.