Recently I was around a physical bet shop close to my area and I observed a man who was shabbily dressed walking in the gambling house. I got into the place to observe what his intentions were. He walked straight to the gaming attendant, placed his bets in a highly coordinated manner and quietly walked out of the physical gambling house. From the way he was well organized, you will never know that he was mentally unsound apart from his dirty clothes and unkept hair and beard.
When I inquired from the attendant, she said he was a regular customer and that he usually raised money for gambling through the manual jobs he does around the area. She also told me that he has never misbehaved and acted violently in the gambling house so she was comfortable with him.
My question now is are there any moral, ethical or legal obligation to bar a person from gambling after physically observing that he is mentally unstable?
From your description it seems that you are just assuming that the man is mentally unstable by the way he is dressed. As long as somebody has the capabilities to understand what they are doing then it is up to the casino to decide if they wan to provide their service to them. They aren't taking advantage of him by allowing him to use money he earned in the way he chooses.
Mental instability can be subjective. Somebody can be neurodivergent and exhibit strange behavior and yet is still capable of being CEO of a billion dollar company, like Elon Musk for example. If Elon Musk wasn't rich and well dressed some people also would think he was too unstable to be allowed to gamble.