Double taxation of income is viewed as immoral. Imagine you earn 1$, and 3 different levels of government apply a 40% income tax on it.
All together you owe 1.2$ for every 1$ you earn. Earn 100,000$, owe the government 120,000$.
If you avoid double taxation, the 0.4$ you send to level of goverment 1 reduces your taxible income to 0.6$. Then you owe 0.24$ to goverment 2, leaving you with 0.36$. Then you owe 0.144$ to level of goverment 3, leaving you with 0.216$.
Still expensive/bad, but not ridiculous.
Taxing income on income not recieved warps incentives. This is why you can deduce the cost of earning your income as a general rule.
State taxes are a cost of living in a state, and hence a cost of earning the income in that state. So you can deduct it from your income.
It does not permit you to deduct it from your taxes. So paying 40$ in state taxes does not reduce your federal taxes by 40$. If your marginal federal tax rate is 20$, then it reduces your federal taxes by 8$.
As for why state income tax, or why not; income tax permits both progressive taxation (taxing people earning more money more than people earning less), and it tends to be taxation that is hard to avoid and relatively easy to assess and collect.
Now, on the other hand, sales tax acts like a tarrif.
Suppose you have two states. In state 1 you have a 20% flat income tax; in state 2, a 25% sales tax.
Suppose you have a widget that costs 100$ in labour, before taxes.
In state 1 to pay your employees (or yourself) 100$ you need to spend 125$. 25$ goes to the state, 100$ to the employee. So you sell the widget for 125$.
In state 2 you pay your employees 100$ for them to get 100$. When you sell the widget, you have to sell it for 125$, and the state gets 25$.
So far so good.
Now what happens when you produce your widget in state 2 and sell it in state 1?
You pay employees 100$. They get 100$. You ship to state 1. You sell it for 100$, 25$ cheaper than local producers can.
How about make it in state 1 and sell it in state 2?
You pay employees 100$ after tax, which costs 125$. You ship to state 2. You sell for 125*1.25=156.25$. 25% more.
If state 2 had an income tax like state 1, but subsidized all exports by 20% and had a tarrif on all imports of 25%, the math would be the same.
Thus, having your government tax base be sales taxes instead of income tax act like tarrif barrier.
The downsides -- harder to tax, easier to cheat, massively regressive that loads taxes on poorer people -- remain. But the ability to effectively place tarrifs and subsidies on imports and exports make it very tempting.