Restraint bias
Restraint bias is overestimating how well you can resist temptation. People who believe they have strong self-control put themselves in tempting situations more often and then give in.
In everyday life
A person trying to quit smoking keeps a pack in the drawer 'just to prove' they can resist, and soon starts again.
You are on a diet but buy a big tub of ice cream 'for guests', confident you won't touch it, and it is gone by Wednesday.
Why your mind does this
Imagining the past and the future is hard, so the brain uses the present as a template. Assuming things will stay roughly as they are now is a quick and usually workable guide. Making sense of events after the fact also helps us learn lessons and feel in control.
Its family, in 30 seconds: Projecting ourselves
How to spot it
Ask whether you are keeping a temptation close because you believe you are immune to it.
How to counter it
Remove temptations from your surroundings in advance instead of counting on willpower in the moment.
Same family: Projecting ourselves
SourcesNordgren et al. (2009)·Wikipedia