There are laws against being homeless.

There are laws against sleeping anywhere in the public view. It is a law that prohibits a behavior that is involuntary. You must sleep. There is no choice.
The less sleep you get, the more your mental faculties break down, your grasp of reality disintegrates, Your body will make you sleep,
If you use stimulants to avoid it, you will rapidly become psychotic, display aggression, and hallucinate.
and the law still forbids sleeping unless you can afford a house or hotel to do it in.
It's a human rights violation

learn from the poor?

virtually nothing is legal without extensive and expensive permitting and review by architectural engineers and code authorities and failing to do this will get you kicked off your land,
responsible for demolition and clean up and facing fines. things like composting toilets, and greywater re-use are never legal anywhere and can result in large fines and charges from environmental authorities.
but as long as it is rural, unimproved land and cannot be seen from a road or from space , no-one cares and you can pretty much do whatever you want.

The folks who rant about returning society to mother nature are those who would be amongst the first to perish under her rules
" A hobo is a migratory worker, a tramp is a migratory non-worker, and a bum is a non-migratory non-worker..."

Welcome to X Please Dont Y Our Z