Not running for re-election has been in the works. Running for President has been in the works. Resigning with nearly half your term to run, in the middle of major battles with the legislature, has not been in the works.
Look, sometimes, when you're running for a higher office, it makes sense not to be embroiled day-to-day in the business of a lower one. That's why Bob Dole resigned from the Senate, and it's why John Edwards didn't seek a second term. But neither did it under fire, walking out and leaving a shambles behind.