Incidentally this is also why everyone working in a nation has to receive these benefits (and any others guaranteed to citizens), otherwise you get migrant workers who suck up this, quite literally in this case, but don't receive healthcare.
Like I could just book a one way flight to LA and become a US citizen because reasons ?
https://www.uscis.gov/about-us/our-history/overview-of-ins-h...
That said, overstaying tourist visas (aka just hopping on a plane and then not going back) is a very popular form of illegal immigration into the US.
I'm all for helping people but you cannot import the world's misery and expect it to be smooth, first because it doesn't solve anything, second because it just doesn't work from a simple demographic point of view.