That's how state taxes are dealt with in the US and a number of people go to great pains to make sure they stay exactly the number of days in some high-tax state that lets them skirt liability. I'd be surprised if similar things didn't happen in Europe but I don't pretend to be as familiar with what goes on there.