The homestead act was created to relieve poverty. It did not work. It did not take too many decades to realize that but it took more than a hundred years for the government to stop trying to make it work.
As to codes for safe housing… Those are definitely needed, especially in cities where lots are small and lot lines put people close together. But the minimum size of houses could use some adjustments. That battle is one the Tiny house community has been actively pursuing with zoning laws for house and lot sizes as well as how many homes can be on a lot all across the country.
There are some exceptions around in cities as to the size of dwelling units. For instance in a commercial building there can be a caretakers unit that is much smaller than the standard required for apartments.
Another variation on that is a caretaker being allowed to stay on a property in an RV. Examples of that are places such as storage yards and facilities.
Agricultural properties can also get permission for an RV or Tiny house accommodation placed on the land for an “employee”.
But even with the homestead act the recipients had to “prove up” the property with a certain amount of time and build a dwelling space on it plus make some other provememts. No building codes back at the start but they did come along later. My first Mother-in-Law, my husband’s step mother lived in a home on land she homesteaded in Anchorage Alaska. Her first husband and she did sometime in the late1940s. Their home was built of concrete blocks with flat roof that was designed to support snow loads. He was the son of the owner of the local
Sand/gravel/concrete business. In fact part of the homestead land was monetized as a working gravel pit. When he died in a plane crash as a mother of school age children she financially had to sell off a big chunk of the land. Later due to a huge LID tax by the foot for a sewer line that the city chose to run the length of her property she had to sell more land. Early on she had donated a few acres to her church so they could build on it. Eventually the property left was just a few acres surrounding the house including a pond and some wetland that fed the pond. Her children inherited the property but they eventually sold and moved to smaller rural towns for a return to a simpler life on some small acreages in smaller communities. It was heartbreaking for them to grow up on a lovely piece of acreage with ponds and a stream, woods and wildlife and see it vanish piece by piece with the city crowding ever closer and traffic noise and trespassers crowding in on them.