This is just the same social contract you agree to in every part of your life.
Why can't you legally drive over 100 mph when you know you'd do it safely?
Why can't you own certain kinds of weapons when you know you don't want to kill anyone or yourself?
Gamblers going bankrupt is bad for all of us because they often have families and creditors who are harmed by the loss of the money, and the rest of us pay the price in the form of welfare, loss wages, etc.
I just don't think those are good analogies.
For one, we are just discussing financial ruin. Not deaths by guns or cars. And it does not impact you. Or else you would need to just regulate poor spending habits. At worse.
I think in principle just about everyone agrees in freedom and liberty where it does not affect society. We usually disagree just about what constitutes 'affecting others'.