the hospitals I've worked in do charge foreign nationals, as in the instance of the Nigerian mother of triplets (I think I'd have been tempted to say, hop along to cash office & get the bill settled, then we can discharge the babies!).
I think most of them pay, the issue making it difficult is that for most things you don't know what the bill will be until treatment's finished so you can't bill until discharge so the opportunities to abscond are there to be taken & recovery is difficult once they're abroad.
I believe there are, or were, maternity health tourists & scams that set them up with NHS numbers and a local address in order to claim free care. I have no evidence for this but it was believed to be happening - midwives go out to the address to check out mum & baby only to be told "Oh they don't live here they've gone back to ---".It's more difficult to stop in places like London where people move around more & it's quite usual for someone to present for antenatal care late in pregnancy having just moved to the area.
We don't have a good reputation for maternity in england at the moment so maybe this will encourage scammers to prefer another country to scam.