Right but it isn’t due to charity. It’s in the governments best interests to do this. It is acting rational.
A socialist government would either ensure everyone qualifies or it wound instead build large dehumanizing concrete towers to stuff thousands of people in, block after block.