I wish I knew!
I struggle with old habits all the time. But, it sort of makes sense... I spent 25 years or so finely honing those skills into habits... so they're not going to leave me overnight I guess.
You did the right thing by recognizing that a half a sandwich is plenty. You had a reason for the decision that you made. If you'd eaten the whole thing, there would have been a reason for that, too. Today, I've desperately wanted to buy something from the vending machine in my office, and the only reason I want to do that is because I am bored and eating breaks up the monotony for me. It is NOT because I'm hungry.
By recognizing that you really only wanted the second half of the sandwich out of habit (not because you were still hungry), you took a very powerful step in the right direction. I don't know how long it will take your new decisions to turn into habits, but you are definitely on your way! Just keep going!