Food and shelter are limited resources which cannot be given freely. If the cost is not remunerated to the provider (in this case government) it imposes an unsustainable burden on the provider to find new resources. There are only so many houses that can be built on this planet and only so many people willing to do it.