You are correct to say gambling makes it way into nearly all environment, including prison wards. It is not necessarily about money but about the need for distraction, connection socially, and a sense of control in such a place where freedom is restricted. The negative aspect is just like you said: going into debts and even misunderstanding may result to violence quickly. Therefore while it is occupying an empty space, it equally brings risk. This shows that gambling is not just all about gains, rather it's involves the human personality desiring play, risk and also escape, as well as in the most difficult situations