I don't see how this is the hospital's fault: they can't keep patients indefinitely. Today's Washington Post has an article on the increasing number of homeless seniors https://wapo.st/3q8Gzeb which includes this passage:
"After treatment for an acute illness, hospitals often discharge homeless patients, who wind up back in shelters or even back into their sidewalk tents and makeshift lean-tos, in what health practitioners in Phoenix ruefully call “treat-and-street.” ... A pinball effect takes hold, said health-care providers, shelter operators and advocates. Homeless people bounce from homeless shelter to hospital, then to a nursing home for a short-term recuperation stay. Once that short-term stay ends, nursing homes must decide if the person is infirm enough to qualify for long-term care. If the answer is no, they must leave the nursing home, starting the cycle over again."