Definitely illegal in the parts of Wisconsin I’m from. Zoning codes generally include a list of permitted uses for each zone, a list of conditional uses that need approval from the local zoning board or officer, and everything else is not allowed. If this structure were classified as a permanent structure, it would not meet building codes anywhere. If not a permanent structure, staying in it would be considered camping, which is not a permitted or conditional use in the zones of the county where I live. (Or maybe it is somehow; I just glanced over the ordinance.) I do have a bit of land in a county that does allow camping in certain zones, but for a maximum of 10 nights per year.
It seems to me that there’s this pervasive sense that the landscape and lifestyles (cars, single-family houses, lawns, etc.) in the United States are what they are because that’s what its citizens want for themselves. The reality is that just about anything else is illegal. Remember, the United States is the country that invented loitering (a.k.a. existing in public without a specific objective) as an offense in order to force (mostly Black) people into working degrading jobs. This is actually the kind of dwelling that Cornish miners built when they came to Wisconsin to mine galena. They got the nickname of “badgers” for it, and that’s why we’re the Badger State (and not due to the animal). So it’s not like this is a new idea that nobody has thought of before, we just can’t do it anymore.
According to Wikipedia, the earliest property tax records are from 6,000 BCE.