Diagnosis in a clinical context is meant to understand the issues a patient is facing and inform interventions to help them.
So when you go to a psychologist for help with quitting cigarettes or gambling or any other form of addiction, they reference the DSM to confirm that you are addicted and gain a better understanding of what treatment approaches might help with the way addiction manifests in you in particular.
In theory, at least. There is some interesting research being done on how we categorize mental illnesses and proposals for reforming everything from the ground up. Many psychotherapists don't find much use in the diagnostic process at all and have learned to treat the patient, not the illness. Much of the diagnostic process is still done by these psychotherapists for insurance purposes, registering disability, or officiating workplace accommodations, but they focus more on applying specific therapeutic methods like DBT, CBT, or ACT in practice.
The DSM is useful for psychiatry, though, because different collections of symptoms are treated with different corresponding medications. I don't know very much about whether there are any medical interventions for chocolate addiction, but there are some recommendations for cigarette addiction. This use isn't much of a surprise, because the DSM is formed by the American Psychiatric Association.
This is highly specific to the US, which is both where the DSM originates and where I live. I don't know how it works in other countries, although from my understanding the specific division we have between therapy and psychiatry is not the same in many other places, but I also know that some countries prefer the ICD or use it alongside the DSM.
The point is that the DSM helps one put a label on what a patient is suffering from so you can reference the literature and research that's been done on treating that collection of symptoms. So it's not really that strange that addiction would wind up as a mental illness, because people do seek out psychotherapists and psychiatrists for help overcoming a variety of addictive behaviors.