A hard session at the gym decreases your ability to resist temptation.

Physical, emotional and mental effort all seem to draw from the same attentional resource. This pool of attention is limited and a period of effort in any of these forms runs down this resource. It’s exhaustion leaves us in a state known as ego-depletion. In this state we are less able to concentrate well at physical, emotional or mental tasks. We are also less able to exert will power when faced a tempting offer.
Baumeister et al conducted several experiments in which people had to make themselves eat radishes instead of chocolates, suppress their emotions or make difficult calculations and so on. They then had to perform another task requiring will power or concentration. The emotionally, mentally or physically tired people would perform the second task less well than those who had not had to do the first one. For example, if they had been thinking hard about a mathematics problem, they would then be more likely to choose a chocolate cake to eat than a salad.
The psychologists’ conclusion was that “the self’s capacity for active volition is limited and that a range of seemingly different, unrelated acts share a common resource.”
So, next time you come out of the gym after a hard session, beware of advertisements. You are far more likely to succumb to temptation than you were before you went in.