Indulging in the occasional slice of cake or chocolate bar can be beneficial for heart health.