Isn't giving up your senate seat to become a President of the United States of America, different from quitting your job midterm?
Not all that different, if you consider that the senate seat was gained as the means for the candidacy and was never planned to be fulfilled in earnest.
Additionally, I feel that if you believe that the public post will benefit from your absence (as in an example when your job is so mired in controversy and media opposition) it is an honorable action ot hand over the post who will better suited to finish the job
__________________
you can't always eat lobster, sometimes you gotta have fish (so says my son)