To a degree, people choose substances or activities that fill a real or perceived need. People who are anxious by nature, for example, sometimes turn to alcohol because it calms them and makes them feel more comfortable in social settings. Likewise, people who have persistent pain sometimes start taking opioids (among the most powerful painkilling drugs) to relieve their pain. People who are concerned about their finances sometimes gravitate toward gambling, particularly if they had a formative experience in which they won a lot of money.
In some cases, people discover the benefit of a certain substance or behavior in a social setting. Others go in search of a benefit they hope to find. The point is that objects of addiction offer people psychological, social, or biological rewards. Often those rewards are compelling, so the substance or behavior remains appealing, even if it also comes at a cost.
One key element in overcoming addiction involves recognizing the value it holds. Once you understand the value you derive from your addictive behavior, you can seek alternate—and less destructive—methods for filling that need.
Clearly, not every anxious person who tries alcohol becomes dependent on it; not every person who is in pain and tries opioids becomes opioid dependent; and not every financially challenged person who gambles becomes a compulsive gambler. Why, then, do some people develop addiction while others do not? Experts are still struggling with this question, but they do know that genes, the environment, and mental health all play a role.