The problem of this goes back to the legitimacy of money being taken in taxes from us. The 'deal' for this country's citizens is we hand over some of our money we've earned to the government as National Insurance so that we or anyone else can access various benefits, including health care. We might realise that for a lot of us, we will pay more in over our life times than we will ever take out, but the 'social contract' is ok, because we see ourselves as part of a community, a tribe, albeit a big one. We see all members of it as being in our 'tribe' so it's ok to give up our money to help them.
The problem comes when you don't clearly define the community, if you start letting the money go 'outside' it stops seeming fair to those paying in for something they aren't getting.
Sadly, the line will have to be drawn somewhere - and I think illegal immigrants while not being part of the community are clearly outside that group even if they are physically in this country.
Flatbread - I don't see that your argument holds about children being innocent - of course all babies are, but why is this little girl born in the UK but not part of the community any more innocent and deserving than if she'd been born in her parents' home country? Either we have a duty to treat everyone free of charge to them or we only have a duty to treat those who are part of our 'tribe/community/society' - only the children of those who are in the group, not the children of the whole world.
How you define who is and who isn't in the group might be wrong, but the rules are quite clear, she's not - being born here doesn't get you in - that might be wrong, but that is a different issue to once you know someone isn't in the community, should they get the treatment anyway.