The morals of society is directed by culture. The state does not and never have a monopoly on culture, because culture is embedded.
If a culture is against gambling, you need no regulation/laws at all. The daoist would argue that the need to have strict laws on behaviour is due to a deviant culture. As an aside the legalist argues that humans are evil, fickle and morally corrupt by default and need strict laws.
I'm just making shit up, but perhaps an Abrahamic culture needs salvation, thus it needs outlets of sin so that it generates demand for people to be saved.
I think society can generally be against something, yet it succeed. Most people consider greed to be bad, but it's the foundation of capitalism. I'm not sure if most people would say gambling is wrong. (This survey, https://www.gamblingcommission.gov.uk/blog/post/gambling-sur..., found only 41 of self-selected UK gamblers rated it positively.)
A democratic state should reflect the desired culture, if it doesn't it's not being democratic. Businesses can also do that, as can other organisations. Most businesses goals are aligned away from benefiting society in general; whilst a democratic state should be at least loosely aligned with that end (by definition).
Thanks for a thought provoking response.