I think loneliness and other sort of emotions can lead to gambling even if they initially don't have the interest in it. This is because once you grow weary and feel you are alone, it can make you divert your attention to something else to distract yourself. You become more vulnerable when you are lonely, so in result, you can do things that you don't initially like to do. Loneliness can make you try to explore things you haven't done before and that could include gambling. The downside when you are introduced in gambling during your lowest of lows, you might become impulsive and irresponsible leading to other worse case scenarios.
That's because they don't have many activities and more often stay quiet, so they feel lonely without any friends or close people visiting them and being able to distract them from that loneliness. They just need to look for activities that can divert their attention so they don't feel lonely, whereas when they are busy with their activities, their minds will not think about gambling. And if they can do lots of activities throughout the day, it can help them really not think about gambling and can prevent them from gambling in the first place. It will be one of the great solutions for those who want to avoid gambling and divert their attention from gambling. They also will not have a negative mindset to do things that have a bad impact on their life because what is on their mind is completing every daily activity because it can provide more pleasure.