But it is high in fat and sugar and snacking on chocolate treats has been shown to be a major risk factor for obesity.
The latest research, by experts at the University of Canterbury in New Zealand, suggests the effect on human behaviour is also crucial.
Researchers Dr Roeline Kuijer and Jessica Boyce wanted to test whether guilt from scoffing chocolate cake acted as an incentive to improve weight control, or undermined dieters' determination to succeed.
They recruited almost 300 volunteers, aged from 18 to 86, and quizzed them on their eating habits and whether they were trying to lose weight.
They also asked them if eating chocolate cake made them feel happy or guilty.
The results showed 27 per cent associated it with guilt and 73 per cent with celebration.
When the researchers looked at weight control 18 months later, they found those riddled with guilt had gained significantly more.
"Associating chocolate cake with guilt was related to an increase in weight," the researchers said in a report on the findings.
"But those who saw it as a celebration were, on average, more successful in losing weight."
The study found guilt made people feel they had lost control of their eating because they indulged in cake. As a result, they were more inclined to abandon weight loss plans.
"Enjoyment of food is essential to people's well-being. This study shows those who consume a 'forbidden food' with celebration and view it as a treat do better in terms of weight management," they said.
"Enjoyment of food should receive more attention than it has in the past."
Psychologist Paul Buckley, from Cardiff Metropolitan University, said women tend to be affected more by guilty feelings than men when it comes to food.
Read more: Gene explains why girls like sweet stuff more than boys
"I think people probably underestimate the effect food can have on behaviour.
"These feelings of guilt are very similar to what happens with bulimia, where sufferers binge eat and then regret it afterwards.
"But this type of behaviour can be deeply engrained and quite difficult to change."
- DAILY MAIL