If you look up "rational" in the dictionary you will find it is synonymous with "logical".
All human actions, and in-fact all actions by all animate and inanimate objects are logical.
We commonly refer to this phenomenon as "cause and effect".
Some events lead to other events. This is uncontroversial.
Human actions are natural and logical consequences of mundane factors.
The example of eating candy while on a diet is merely an example of cognitive dissonance, which is a symptom of poor self-knowledge. A person's inability to predict their own actions does not make their actions "irrational", it simply makes them incoherent (lacking unity).