Actually, it sounds like NY is one of the states that plays nice.
Imagine that you had a warehouse in a state and no income was earned in that state. Also, imagine that all your sales were in an adjacent state. Imagine the state you sold in had no income tax. Is none of your income taxable in the state with storage?
If the storage didn't exist, then sales would be reduced down to what could be held in the store. The out of state storage materially impacts the income earned in the other state. That additional income, it could be argued, should be imputed to the state where the storage happens assuming there are no additional costs.
It isn't uncommon for firms and people to split the location of capital, expense and revenue among various states. You could have servers in one state, programmers in another state working from home selling to a customer in a third state.
Each state makes its own laws as to how to allocate the role of capital, expenses and revenue. They often conflict. You end up having to follow all the laws, which can result in higher taxes overall.
Once you enter a state, you become subject to its laws. Because we live in a virtual world, the states require a "nexus," into the state. You do not have to step foot in it.
Each state is sovereign, subject to the federal powers granted to the national government in the Constitution. They are free to do anything they want as long as it doesn't specifically conflict with a federal power, or a right granted by the Constitution. They were intended to be a federated set of sovereign nations, the meaning of "state" at the time. They can do most anything they like inside their borders, particularly with regards to taxation.
I used to live in a place that had a tax on breathing. If you were breathing, it was $7.50 per year. You didn't have to pay it if you stopped breathing during the year. They were not going to dig you up to get you to pay.
I also lived in a state where towns could charge a tax on a business's worldwide income. It actually could be a material amount for a multinational corporation. Step foot in one of those towns for one second during the year and you could owe enormous sums.