These things get buried deep within the brain, OP, none of it is your fault. You’re not weak. You just need to find a way of unpicking your past and the way your brain is wired to eat what you can when you can.
I work with teenagers, some of whom have had very sad lives as babies and toddlers in terms of extreme neglect. Nearly all of them have been left with deeply entrenched behaviours that to anyone who doesn’t know their background, would find hard to understand.
I recall one boy who was basically left at home without food as a very young child and he had to root through bins for any scraps of something edible. It showed in how he approached food years later as an older boy, even though by that time he was very well looked after in a stable foster family. As an example, say he ate a piece of shortbread, you know with sugar on it? You know how some of the sugar comes off and goes on the plate/container? Well, after finishing the biscuit, he would repeatedly lick his fingers for at least 20 mins later so that every last grain of sugar stuck to his fingers so that he could lick it off. Seriously there would be not one grain left in the container by the time he had finished. And, you know how when you peel a banana, sometimes the “string” separates from the banana? I have never known anyone to eat the separate stringy bit as the texture is a bit odd on its own and most find it unpleasant. But he would detach the rest of the “string” and eat that first on its own before eating the rest of the banana. He also would ALWAYS comment on what you were eating even if he had already eaten his lunch. Like a salivating puppy! Eg “That looks nice! That looks SO delicious!”
When we first knew him we would feel guilty and offer him a bit but then his foster family explained that he did have issues around food and they had to hide food from him
as otherwise he would compulsively eat it. They explained that as a result of his earlier neglect, his brain was wired not to know where the next meal was coming from and so he would grab the chance to eat something, however unpalatable, whenever he could. And not to waste a scrap.
He was not overweight then as they carefully monitored his eating habits and he did seem to get a bit better with asking staff at school for things/hinting that he would like some. I just hope that now he is an adult and looking after his own food intake that he has learned to regulate his food intake according to hunger and not out of terror that one day he may not have enough again. 
You, OP, clearly see the reason behind your eating habits, so I think you’re in a much better position to explore your own reasoning with a professional who can help you to get into good habits which override the inner voice.
Best of luck! 