This is due to the Licensing Effect (aka self-licensing, moral licensing). The Licensing Effect occurs when people make a good or virtuous choice that ‘permits’ them to make a bad decision later. An example of this would be someone on a diet believing that they’ve ‘earned’ an unhealthy meal by avoiding junk food during the week.
Convincing someone to make a ‘bad’ decision would therefore be easier after they have made a particularly good decision.
(See an article covering a study done on the subject of self-licensing here.)