Then there's New Hampshire. The way I understand it, ten or twenty years ago, a lot of folks got it in their mind that they could move just a little further north, and avoid paying their fair share of what it costs to maintain a healthy economy in Massachusetts. New Hampshire didn't have an income tax. That state raises money primarily through property taxes, and in general, at the time, spent a lot less on providing services and fostering a healthy economy. So that kept the property taxes relatively low too.
Well, as all other states that rely heavily on income tax revenues, Massachusetts imposed non-resident income taxes. As others have suggested, if you pay non-resident income taxes, your home state generally applies that amount as a credit onto your home state income tax bill. However, without a state income tax, there is nothing to credit against, and so you're essentially double-taxed: Taxed non-resident income taxes by the state you work in, and taxed the higher property taxes by the state you live in.
And the option to just get a local job is not practical: New Hampshire, Vermont and Maine have never invested in fostering a healthy economy in the same way that Connecticut, Massachusetts and Rhode Island have. Sure, there are some jobs, but now, ten or twenty years later, many New Hampshire residents still find it better for themselves to endure the double taxation and work in Massachusetts, because the commonwealth's investments in its economy have generally paid off: the opportunites are greater here, and the jobs themselves are generally better paying.