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: 
The very short version is "laws". The more helpful version is that every state has its own taxation requirements. For instance, if you work in Illinois you are required [to file appropriate forms](https://www2.illinois.gov/rev/individuals/filingrequirements/Pages/default.aspx) stating what you say your residence is. 

Every state works a little differently, so you'll need to review every involved state. [Here is a law firm's advice on establishing state "domicile" (residency)](http://frostpllc.com/establishing-residency-for-state-tax-purposes/). 

The short version is that you will be required to tell the state you get paid in, and the state you claim to live in (if they have a tax or other reason to care), with yearly filed forms what your status is. Many states you might work in don't actually care where you claim to reside - you pay taxes regardless.

All states have figured out that this is a 'great' and seemingly 'easy' way to dodge taxes, so in my experience if you work/live in multiple states it doesn't matter how honest or correct your taxes are - they will all often request more paperwork asking you to prove what you say about your residency is true. If you do not provide it, they will assume the truth is whatever gets them the most money, and the onus becomes on you to prove otherwise. And the documents they require quickly become non-trivial. 

At one point I had to provide copies of birth certificates, driver license and registration, car insurance, lease(s), school records, a signed/notarized statement from myself asserting my proper status, W2s from every job, copies of tax returns in every state I filed and a copy of my federal return, etc. And I had to do something similar for every state I filed in. It all worked out fine - but every state was very keen to cut down on this form of tax fraud (this happened within the last few years).

States with low/no income taxes don't like being used for this, because they lose money too - those states generally rely on other taxes which you will contribute minimally to. States with income taxes where you work and claim not to live aren't keen on such a situation either, because they lose a primary source of income.

So all in all, this is a very well known issue among tax authorities, and they are legally entitled - and usually will nowadays - to demand you provide proof that you meet the legal requirements of the state in terms of domicile and tax status. If you cannot provide the proof, they will make you pay. If they catch you lying, this is tax fraud, and tax authorities really don't mind hitting you with penalties. If you've done this more than once, they will also automatically flag past returns to go back and check, and they are generally quite happy to refer you to the district attorney for additional 'handling', plus penalties. And on top of it, tax authorities have a very unusual presumption of innocence - which is that they tend not to have that. They can go back and say, "well, you were lying/wrong about this thing, so we will assume everything else is wrong and charge you appropriately" - and then you have to prove you aren't in the wrong for every item. This will generally mean you need a lawyer, and they add their own expense on top.

The name of the game is "some people get away with it - so they punish people extra hard to try to discourage you". So don't do it :)
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.
> 
> 
>