It's not just the homeless, it's anyone without insurance.
Assuming for the moment that someone who is in an emergency situation has the presence of mind to try an concoct a scam...it usually wouldn't work. There are lots of reasons for that.
Let's say you're hit by a car, and taken by ambulance to the nearest hospital. They will treat you, but then...The hospital would require a social security number, and with electronic databases and HIPAA, they would probably find your true identity quickly. After the emergency phase has passed, a hospital social worker or some such person would be assigned to the case, and do some digging. They pursue payment vigorously while you're in recovery. They would see if you qualify for any federal programs (like Medicare) and have you enroll. Or they would transfer you as quickly as medically possibly to a public hospital (like a county facility) which receives federal funding for the uninsured (called an FQHC facility).
You would rack up hospital bills under that social security number, and receive many bills in the mail (whatever address you give). An electronic health record would be generated, with identifying information.
In other words, it's not just a walk-in, walk-out kind of thing. The hospitals work very hard to prevent that kind of fraud (hell, I have to show my medical card, AND my driver's license just for regular doctor visits).
If you have insurance, the co-payment for emergency room care is usually pretty small (ours is $50, some go as high as $500. Not bad compared to the usual $10,000 - $30,000 bill). It's not worth committing fraud to get "free" care in some dismal government facility.
This is the correct motorcycle.
Hospitals actually will, in many cases, not pursue bills against genuinely indigent patients. You can't get blood from a turnip, and it's not worth it to even try, so better to just write it off for the tax break instead. But if someone has income, assets, and/or insurance, you naturally want them to pay, even if they can't pay all at once.
Homeless people just aren't going to care that much about their credit score, and they have no way to pay anyhow, so they get care at no measurable cost to themselves. Everyone else ends up paying for that.
I, for one, support universal coverage for everyone. Maybe not "free" for everyone, but a sliding scale based on one's income. (And yes, everyone who has income would pay taxes into it, too.)