Question: Lets say you work in Chicago and live in Chicago but put your home address as somewhere in Indiana. Then every week you collect the mail that is being sent to you in Indiana. Wouldn't you save a lot of money assuming the taxes are lower? What prevents people from doing this?

Answer: 
It's difficult if not impossible to do if you actually live in Chicago, and just have a mail drop in the other state. You'd need to establish effective residency there, by e.g. owning a residence, spending time there, maintaining voter registration, driver's license and so on. All of that is likely to cost more than you'd save in taxes unless you are a) really rich; or b) actually do live in the second state, and just work in the first.

As an example of b, for a couple of years I spent alternate weeks working in California & living in rented lodgings there. The other weeks I'd work from my actual (owned) home in Nevada, where I maintained everything that goes into establishing residency. As a consequence, I only had to pay California nonresident tax on the portion of my income that came from the California client, not on income that I got from my other clients. The critical point here is that I actually WAS a Nevada resident, and had been for many years before taking the California job, so there was no lying about my resident status. It was never questioned, but I could have easily proved it if it had been.

PS: And per comments above, the only reason this actually benefitted me is because only a fraction of my income was from California. Had I had only a single W-2 job in California, I think (though I've never actually worked it out) that I would have paid as much whether I was a resident or non-resident.
I'm surprised no one has yet mention an important reason: **ignorance**.

Your question (and other answers) assumes people are aware of all the benefits and costs of making such decision. However, **we are not rational machines**. In reality, we have limited knowledge of the world. There is an amazing article about a recent book on the topic ("The knowledge illusion") [here](https://www.nytimes.com/2017/04/18/books/review/knowledge-illusion-steven-sloman-philip-fernbach.html). A nice quote:

> 
> Over the last few decades, the ideal of the rational individual has been attacked from all sides. Postcolonial and feminist thinkers challenged it as a chauvinistic Western fantasy, glorifying the autonomy and power of white men. Behavioral economists and evolutionary psychologists have demonstrated that most human decisions are based on emotional reactions and heuristic shortcuts rather than rational analysis, and that while our emotions and heuristics were perhaps suitable for dealing with the African savanna in the Stone Age, they are woefully inadequate for dealing with the urban jungle of the silicon age.
> 
> 
>